Dot 3, 4 & 5.1 brake fluids absorb water. When overheated, water turns to steam and will allow the lever to go to the bars without any braking effect. Once the fluid cools, steam converts back to water and normal braking is regained as water won't compress. Overheat the pads, calipers and the fluid to waters boiling point and it will happen again.
In cases like this, a complete fluid flush with a new bottle of brake fluid is in order.
__________________