There may be many reasons why a cat likes to sleep in a room. Cats are resting animals and spend most of their time sleeping, so this may just be their nature. Additionally, cats like to sleep in safe places, so they may feel that the room is a safe place.
It may also be because cats like warm places, so they like to sleep in the room. Whatever the reason, it is normal for cats to sleep in their rooms. If you don't like your cat sleeping in the room, try preparing a separate sleeping space for it, or provide it with a comfortable cat nest to give it more choices.