I agree with DorgEndo, more likely the the dog opened it, I think about the only way the beardie could is if the door was already open enough to get its head partially through. I have seen mine try to push their way through gaps a few time.
I hope your beardie wasn't hurt to bad by your dog, that is a scary and potentially dangerous thing.