There are different types of electric bikes.
Some jurisdictions restrict electric bicycles to those with "electric assist", where you'd still have to crank the pedals to make the motor run. Those are more or less operated like regular pedal-powered bikes but you won't have to be an athlete to get up a slope.
I don't think that type is the one called out here.
Any type where a motor is controlled by a "throttle" is actually a moped, and should be legally classified as a moped IMHO.
And neither mopeds or bicycles should be allowed to run at speed on a pedestrian path. If it is not a road or bicycle path, you should first not be there unless there is an alternative, and you are restricted to walking speed, regardless of vehicle. That is often the law.
There are many places where regulations originally for scooters for disabled people have been misapplies to newer types of electric vehicles that hadn't been envisioned yet when the rules were put in place.
Especially companies renting out electric kick-bikes have been taking advantage of that type of loophole, in too many cities. Those are the most dangerous of all: high centre of mass, small wheels, large mass because it is a rental vehicle and must be sturdy, and used by people that aren't used to bicycles and somehow think they are infinitesimally narrow and can move like pedestrians -- only faster.