The short version is what Norm said, the long version is - When you apply the brake a force is generated that tries to rotate the wheel around the brake pads. Because disc brakes are quite close to the hub & behind the fork the force generated ends up being almost straight down. Now there is a school of thought which thinks that this leads to the quick release skewer to come undone*. Now if you have the brake calliper in front of the fork not behind it you change the force from a downwards one to an upwards one which is 'safe'. Interesting thing is this the only QR skewers I've had problems with coming undone on rides have also exhibited this behaviour on bikes with rim brakes (because the rotation force is close to the tyre edge the force is more-or-less straight back into the bike which means that there's metal of the dropout in the way). I've found that replacing the, cheap unbranded, skewers with reputable brands (Shimano, FFWD, Hope, Planet-X, etc) have solved the issue. My conclusion - disc brakes aren't the problem it's bad QR design.
*Oddly no one yet has managed to give me a good explanation as to why a downwards force translate into the release of the QR leaver, they've only made a case as to why the wheel can be ripped out of the dropout, which is a different problem & something I've not seen reported!