Electric bicycles are actually more efficient than bicycles (which are themselves more efficient than walking). The combination of human power and electric assist uses less total energy than human power alone!
I wonder how is it possible to use less total energy? If you need to apply an amount of energy to travel a given distance, the amount can't be that different whether the energy comes from muscles or from an electric motor (or a combination of both). These are different sources of energy, but it's still energy.
I'd imagine the movement of the legs while pedalling would affect the aerodynamics, but is there something else happening?
It requires looking farther back into where the energy comes from. Humans are rather inefficient at converting calories in carbohydrates into movement. Electric motors are comparatively better at turning electric potential energy stored in batteries to kinetic energy.
Keep going this way and you'll eventually reach the efficiency of converting solar power to movement, which is again directly comparable, and electrical systems win compared to biological systems.
I would imagine that the efficiency of a human peddling depends on the speed. So maybe it's more efficient if the motor does most of the work to get you up to speed?
There are different technologies. Cadence Sensors are cheap but only good for long commutes an a bike lane, they don't kick in immediately (less efficient). Torque Sensor is only sensible thing to use in urban settings.
Do e-bikes generally have regenerative breaking? I assumed that given their weight the amount of energy captured would be very low also bikes have very different braking patterns compared to cars (unless maybe if you're going downhill and don't want to go too fast).
Some electric skateboard do. I think what's stopping many to use it more generally is that you would need to disengage the system if you want to use your bike without the battery.
More complex braking system might introduce a lot of problems to a bike where that should be a simple thing, probably easier to have extra set of hydraulic brakes in case the battery is dead.