@duglop Simple: it's a cat with a cat brain. Also, it probably entered the bedroom from having taken a poo in its litterbox.
@Susandoyle @duglop LOL, the only time my cat has ever done that was when my brother-in-law made a loud noise in the middle of her doing her business, so she had to leave before completing. We then found her scooting her butt on the living room carpet and soon after found her completed business on the rug Mom gave her to snuggle with in the living room. Fortunately, it was solid enough not to have left a mark, so we had only to sanitize the location.