My almost 4 year old

My almost 4 year old who is potty trained been pooping on the potty for months now recently pooped on his floor yesterday and walked all through it. No poo on his underwear or even any on the toilet it's almost as if he did it deliberately. I'm not sure how to deal with this? I didn't get mad or anything I explained to him that was not where we poo poo. But whenever I talk to him I can see the wheels turning but I don't think he's getting it? I am trying to be understanding but why would he poo on the floor and walk all through it and not tell his daddy or I that he did it? I'm at my wit's end! Is it behavior problems? An accident? Please help.