It isn't locked to the rogue class. But it was a dialog decision for the rogue to offer to the cleric. The cleric may not have had the skill to pick the lock and failed thus started to beat the door. The rogue offered to pick the lock but then realized he didn't have any lock picking tools to pick the lock and this went searching for some.
He would have come back and picked the lock if he had found the tools he needed.