Law and ebikes.
Here in NM, I called the Motor Vehicle Department once about it and they said "Electric bicycle? I did not know such thing existed". However, I studied the question a bit and here, there are no law for these devices in particular which means that they tend to fall into the category of motorized vehicles, hence requiring license + insurance. I used to belong to several eletric scooter newsgroups that debated the topic (regional legislation) at length.
In CA (and perhaps some other states) these vehicles are the object of a special law and are legal and the same applies in some other countries.
However, even when technically illegal, the police is seldom interested in them, although you are taking a gamble since driving without insurance (and perhaps without license ) is a pretty serious offense. There was a kid in that group who got arrested for driving a zappy electric-scooter and charged with driving without license and without insurance. Some other members had problems with authorities as well.