No, the male and female hogs do not normally bed down together, although never say never! We can only surmise as to what was happening. One scenario I can imagine is that another male went into the box when the current resident was absent and when he came back he couldn’t get the other one out, if it was curled up in the box, so may have settled down in the entrance instead. That would mean the other hog was trapped in there until the one in the doorway moved – so he may have been quite keen to get out at the first opportunity. Sometimes, we just never know, for certain!
However people do occasionally report that hogs are sharing a hog box. Often it’s youngsters.
Good news that you’ve seen a male and female. Fingers crossed there might be some hoglets later on!