As has been pointed out, it seems to be company specific depending on what is in their ops manual.
Our airline allows refuelling or de-fuelling with pax boarding or de-boarding.
It is subject to various provisos such as someone occupying the flight deck, doors manned , pax remain seated with seatbelt signs off, airbridges or steps open and unobstructed etc.
Basically to allow an evacuation if necessary.