To understand why the .38 and .357 are the same size, we have to go back to the Civil War. Revolvers in those day were almost all what today we call "cap and ball" -- designed to be loaded with loose powder, a separate projectile and ignited by a percussion cap.
To make such a revolver, you drill the chambers from the front, leaving a wall in the back of each chamber. Smaller threaded holes are drilled for the nipples.
To load such a revolver, point it straight up, pour a charge of powder into one chamber, then seat a ball in the mouth of the chamber and ram it home. The ball must be a tight fit. A proper "fit" would actually leave a thin ring of lead shaved off the ball, and most revolvers had a compound lever rammer mounted under the barrel to give the shooter the necessary power to ram such a ball home. When all the chambers were loaded, grease was smeared in the mouths of the chamber (lead bullets must be lubricated, especially when shot in rifled barrels.) Putting caps on the nipples left the gun ready for action.
Note what this all tells us -- in a cap and ball revolver, the chamber, ball and barrel had to be the same diameter!
At the end of the war, it was obvious the metallic cartridge was the wave of the future. Now, how do we make a revolver for mettalic cartridges?
The simplest way was to modify the old cap-and-ball revolver. Simply drill the chambers all the way through, hinge the right recoil shield to make a loading gate, and reshape the hammer nose to ignite the primer.
But we have a problem. In a metallic cartridge the bullet goes inside the case, and the case goes inside the chamber. The bullet is too small for the barrel and will not shoot accurately!
So bullets were made more or less in the modern "bullet shape" but with the back end of the bullet reduced in diameter. That back end was called the "heel" and it fit inside the case and was crimped. The rest of the bullet was left at bore diameter.
But what about the grease? It was smeared on the outside of the bullet. And it rubbed off if you carried cartridges in your pocket, collected sand and grit in a cartridge belt and so on. Not a satisfactory situation.
The solution was to make the entire bullet the size of the heel. The grease was in grease grooves, and the bullet was seated deeper, so the grease grooves were inside the case. Such ammunition was called "inside lubricated" and is the style still used for lead handgun bullets today.
But now the bullet is too small for the bore!! What can we do about that?
Well, we can make the case larger -- which means making the chamber larger, and that means making the cylinder larger, and on and on. Or we can make the barrel smaller.
If we make the barrel smaller, we can make the new bullets out of soft lead with hollow bases and they will still shoot fairly well in older revolvers with the larger bores.
And that's what they did, and why the new ammunition was still called ".38" caliber, when it was actually smaller by twice the thickness of the case walls -- in the case of the .38 Colt, it became .357 in diameter.
When Smith and Wesson "stretched" the .38 Special (which was a stretched version of the .38 Long Colt, which was a stretched version of the .38 Short Colt) and loaded it to higher pressures, Douglas Wesson, the president of Smith and Wesson, decided to give it a catchy name -- ".357 Magnum."