The girl ran off so quickly. Maybe she just didn't want to get in trouble. The man quickly ran upstairs, hoping to catch the trespassers. As he passed through the door, he closed it, altered the locking mechanism so it could only be opened from the inside, and placed a magic lock on it. The man thought he'd still be doing his job...the door is, technically, guarded....in a way.
It's possible he could still salvage his reward, just catch the trespassers, and get them to agree to not say anything about going upstairs. Maybe nobody saw them go up while he was asleep.