Legal fiction
Something the law creates or accepts as a fact, even though it is not true, to achieve a particular result. An annulment, for example, is a legal fiction because in granting an annulment, the law refuses to recognize a marriage and treats the parties as though they were never married when, of course, there actually was a marriage.