Generally, no
Despite the common trope, throwing a melee weapon in real combat is not a good idea. You won't pick it up using a free action like in D&D, so this generally leaves you disarmed till the end of the fight.
Knives and javelins were the most popular throwing weapons, but they were designed specifically for throwing. This includes exotic throwing knife variants like chakram and shuriken. Throwing axes like tomahawk and francisca also worth mentioning, although they are still specifically designed.
This doesn't mean you can't throw a convenient hatchet at all. This is definitely possible - I personally saw this kind of trick in real life, but effectiveness of such attack would be far from perfect. Hammers, on the other hand, are particularly awkward for throwing, since they have their center of mass near the head.
There are medieval fencing guides which describe ridicules tactics like throwing an unscrewed pummel into an opponent, but these evidence are rather anecdotical than historical.
Although throwing hammers were known before D&D
In western culture, the most influential throwing hammer was Mjölnir - the hammer of the god Thor in Norse mythology. This concept was introduced into the pop culture by Marvel Comics in Journey into Mystery no. 83 (August 1962). Since then, many western media re-used the trope, so there is no surprise the concept came to D&D.
Mjölnir was magical and required special gauntlets in order to work properly. However, throwing a non-magical melee weapon looks plausible, can work in few situations, and just looks cool. A typical D&D player would be surprised if a light hammer could not be thrown. Presumably, you throw it like a tomahawk - that's how I'd describe this in my games.
A picture from the 3.5 handbook can be just wrong
Speaking of depictions, pictures vary from one edition to another. 5e depicts warhammers in more "realistic" way (long handle, small head). In 3.5 they have more "fantasy" design, and probably were drawn by an artist who didn't even know this was supposed to be a throwing weapon. In some cases, official materials fall short. The writers/artists are, after all, only human and can miss details.
At the end of the day, there can not be such thing as industrial standards in a pre-industrial setting. Every blacksmith craft their own weapons, so it's rather a group of weapons with similar properties, not a typical standard design.
The PHB doesn't claim this explicitly, but tangentially confirms in the Improvised Weapons paragraph:
a character proficient with a weapon can use a similar object as if it were that weapon
So you presumably can throw something even it is just similar to a throwing weapon.