That fed law pertains only to selling ebikes, and still calling them a "bike" It has nothing to do with the legality of riding one. Many states do have a version very close to the fed laws in their state vehicle code.
Yes, your state vehicle codes and even local city ordinances govern street use of ALL motor vehicles in the USA, including bikes, mopeds, and even horse and buggy.
CA has one of the more complicated statutes, with a bike level and a moped level. That's good and bad, since they overregulate the moped class IMO.
Even in CA though, a person riding responsibly has a great tendency to just get ignored by cops. Police have other jerks to regulate who are doing much worse things than going 25 mph on an ebike.
Back a few comments, In my state a pedal bike is a "vehicle" but not a "motor vehicle". If you put a motor on your bike, it's a moped. And that is a motor vehicle, but not one that requires insurance to operate.
Hell yeah you are liable for any mayhem you cause. That is the same if you pedal or motor.