1- Less Lever Effort
You can check working mechanism of hydraulic brakes online. I will not get into details of it but basically it is same as other hydraulic equipments such as car jack. In same principle, hydraulic system amplifies your power on lever and create a big stopping power.
If you own a commuter electric bike and need to ride for long duration, this will be a big issue for you. Mechanical disc brakes will make your hands sour. The same is true if you are riding downhill and need to brake a lot.
2- Closed Circuit
Hydraulic brakes on e-bikes have close circuit system so dirt can't get inside. On the other hand in mechanical brakes dirt can get inside. If you have mechanical brakes on your electric bike and go from mud, moving parts will be subject to mug.
You will need to clean the mechanical brakes otherwise you will hear strange quirky noises and you will see major drops in stopping power.
Hydraulic brakes need much less maintenance compared to mechanical brakes on e-bikes.
So they are easier to operate and easier to maintain. Of course we aren't talking about zero maintenance. You need to check oil level from time to time and add oil when needed. This won't happen more than once a year or in some cases once every next year.
3- Less Adjustment
In Hydraulic brakes we have two pads and both move towards to rotor. So rotor is squeezed evenly from both sides. On the other hand on mechanical brakes movement is on singular direction. Because of this there will be minor bends on rotors on mechanical brakes or some dislocations. And you will need to adjust the mechanical brakes from time to time. Most hydraulic brakes need no adjustment unless you drop your bike or there is an outer impact on your e-bike's hydraulic brakes.
Also this will let you change your rotors earlier than hydraulic brakes.