It doesn't
DB or any means of switching would have to be mounted but means strong enough to hold it from comming mechanicly off under stress that can be reasonably expected, plus some other reasons incorporating fire , exposure to other influences etc... It does not matter if you even use magic to make it stand in a free air as long as its mechanically safe (or not causing a potential risk) and sound in both normal and plausible emergency condition (such as fire, leaking pipes...). Studs are only some of the options. I would not consider plasterboard as suitable means of fastening DB,unless maybe cement board(backer board). With suitable means of fixing it is perfectly OK to put DB directly on a brick/concrete or steal stud.
Make sure it is acessible when in use (not behind lot of junk in a full corner cupboard under the stairs or behind pods plates inside the kitchen cupboard;-). Consider Document M (I find it the most missed one when placing DB). If you haven't read at-least relevant parts of Documents A,B,P,M then you should catchup, as BS7671 is just guidance, they are law (along with others like parts of EaWR etc)