There are odd rules for building custom bikes. Manufacturer, even small one who make a handful of vehicles, can't sell whole vehicles because they don't go through DOT/EPA and meet those standards. But you can buy a chassis kit, and buy an engine and put them together yourself as a 'custom' build and the rules are more lenient. Further, you can buy both of those things from the same place and pay them to assemble it for you. So you write one check, never turn a wrench, and it's legit. you're not really building it yourself and you're also not technically buying a complete vehicle so it's right on the edge of legal.
The rules are tighter on cars than bikes, and I think you're still supposed to meet your state emissions requirements for the year you build it but there are ways to get past that. Also, I think Cali just put a law in place that you're only allowed to register one custom in your life. Kind of putting a damper on small builders who build in their garage, ride a while, then sell and start over.
Now, if you happen to have the slightest scrap of a chassis from an old vehicle with the serial number intact, modify that chassis, put a motor in it, well... I believe that if it's a pre-early 70's there were no emissions laws. So if the chassis is from then, the vehicle is from then, and you don't need to meet any emissions rules. The chassis mod can be replacing nearly all of it except the serial number stamped tube, so...
Scott