As the law stands, as soon as the MOT garage enters on the VOSA computer system that the car has failed, it invalidates any existing MOT expiry time it may have so if you drive it away, you can be stopped for driving an unworthy vehicle and the odds are you will by any passing Police car or go past one of the sneaky roadside camera systems. They all seem to be equipped with Vehicle registration recognition systems that automatically flash such things up or warn other patrol cars in the vicinity. It will probably also invalidate your insurance if you have any accident.
Of course, some unscrupulous garages are claiming that when it fails, you therefore have to leave it at their premises. They can't do this, ie take the law into their own hands. They are trying it on with many people in order to try and ensure they then get the work to fix the vehicle. You are within your rights to say, thanks, but I'm driving it away though obviously you can/may/will be stopped or have an accident and if so, it could become expensive as you are driving without an MOT.
The trick is when you want to have an MOT, if you think it may fail, book it in for a pre-MOT check first. It's usually an hours labour charge max. The important thing is the results of these are not entered on the VOSA system and so won't invalidate any existing MOT period.
Edit: Incidentally, when I was at our local garage the other day for one of our cars MOT's, the owner said there are murmurings that the whole MOT system is going to be reviewed and there have even been suggestions that it may get completely canned. He said no one seems to have any idea if so, how that's going to ever work, though there are perhaps hints in that if you have a classic car ie pre '74 no MOT is required anymore, though insurance companies obviously still require some proof of road worthyness for them.