I'll add to this thread since the original question looks similar.
My bike has
Shimano BR-M395 disk brakes that have been working fine for over five years now.
The front brake still works OK, but since removing the rear wheel the other day and putting it back
without touching the brakes at all, I noticed it braked fine while on the stand but had close to no braking power on the road.
After removing the wheel + disk pads today and pressing the brake lever slightly, it turns out the right piston didn't move at all while the left piston did stick out, which would explain the issue.
What's the technical reason? Is the brake simply too old and I should get a new caliper?
Thank you.