Many cities have speed laws for e-bikes because they uncomfortably straddle the line between a motorized vehicle and not, and it is hard to tell the difference on sight. A Class 3 e-bike can legally go 28 mph and there isn't much preventing people from modifying their e-bikes to go faster.
The reason why they are getting regulated in NJ is because a lot of e-bike riders are either riding them on sidewalks at near car speeds or they are going faster on roads but ignoring road regulations like stop signs. The e-bikes have to go somewhere while both pedestrians and motorists don't want to give up their space.