Akikiki
A'-Lo-HA ! y'all
The question was about electrical code compliant which is for safety. The to answer your question of "why", the simple answer is cost. Builders save money by wiring 30A circuits to NEMA14-50 outlets in the laundry rooms. It's code compliant and practically any dryer on the market will work because manufacturers make them compatible with 30A sockets too (notice that the dryer doesn't come with a plug typically). The difference in wiring cost between 30A and 50A can be as much as $2 per foot (4 wires * 0.50 per foot), so on a 50 foot run the builder saves $100. My original point was that when adding one for a Tesla, pay the $2 per foot more up front as it's way cheaper than upgrading later, if needed.
You have one in your house? That does not mean its universally done or acceptable. Sorry. I didn't glean from your recommendation that you were encouraging the owner to put the larger gauge wire in, in the first place. I read it as you were saying don't do it. Sorry. My misreading, I guess. Not worth the effort to cover it all again.