My cat does that too sometimes. My cat sometimes does that because she is either constipated, or being a little paranoid (she acts crazy sometimes). It's normal, but I think it just depends on the cat. It's not a matter of training or anything, it just depends on whether your cat ate something that didn't agree with its stomach, or it was just acting a little weird.
is it anywhere near the box? my cat tries and sometimes he's in the box and poops outside of the box...maybe you could isolate your cat in a room for a day or so with the box to reinforce that the box should be used for potty? good luck
Your cat poop on the floor at random times probably because you keep changing the location of the box or she's not yet properly trained. Try keeping the box at a consistent spot that is both open and quiet.