There are tasks in D&D that are deemed so trivial or non-important that they happen off screen. You just assume stuff happens and the game proceeds. In many cases no checks are even required. Then there are the tasks that are a little bit more important and the result of the check will have some kind of impact on the game. Nothing life-or-death, but some noticeable effect. And then you have full blown skill challenges with all the structure and XP that comes with it.
From time to time it’s interesting to take some of those marginally important tasks and turn them into skill challenges. These are opportunities to encourage creative role-playing. There is structure and there is XP, but the real objective of the encounter is to have fun. If the PCs happen to earn some XP along the way then that’s just a bonus.