I don't fully understand it myself but FWIW (hopefully someone will come along later and add to or correct my thoughts).
Any object that could be used to kill/maim is essentially illegal. Nihonto get around this by being part of the cultural heritage and are thus considered cultural/art objects.
Certified smiths must have trained a number of years under a qualified smith and then receive a license (not sure how the testing works - my guess is the teacher handles it but with official oversight). The blades must be made in as traditional a manner as possible (though there are certainly modern conveniences) including use of tamehagane smelted in NBHTK tatara. There is another term (I don't remember it) for steel smelted by the smith which can also be included.
Swordsmithing is a VERY unprofitable business which is why so many smiths now and centuries ago produce other tools, from gardening utensils to kitchen knives. Many smiths are rather unknown and there are swords intended more for martial arts use (or at least less as an art object) which hover around the 200,000 to 500,000 yen mark....
Recent SFI thread:
Where to buy shinken/shinsakuto?
So yes, no mass-produced cheapies, that's for China

. P.S. I do believe there were quite a few tourist swords made (and likely STILL made) in just about every culture that had them (from the Victorian overly heavy reproductions of presentation two-handers to the recent 33 lb Kukri :jerkit

.
Edit: pay attention to the Rich S and not me.