For sure, they act totally different in a public toilet. Very carefully locked door in that case. Hell, the first time my son used a public toilet on his own, I had to talk him through how to actually unlock the door when he finished. I tried to tell him not to latch it since I was standing right on the other side of the door, but no, -CLICK- went the lock anyway.
There is a difference between pooping in front of family and in front of strangers.