Three-year-olds are discovering that they are separate people with their own wishes, and they test that discovery constantly. Poop is one of the few things no adult can make them do, so when the rest of life feels directed by grown-ups, holding or choosing the diaper can be a way of keeping one thing their own.
At the same time, many families are deep into potty training. Pee often goes well, which raises expectations for poop. But pooping asks more of a child: relaxing a muscle on purpose, in a new position, with the feeling of something leaving their body. If a poop has ever hurt, that feeling is tied to pain, and the toilet becomes the place where the scary thing happens.
So a three-year-old may pee happily on the potty and then ask for a diaper, hide behind the sofa, or hold for days. From the outside it looks like refusal. From the inside it is a child protecting themselves in the only way they know.
This is also the age when holding can turn into real constipation: held poop dries and grows, the next poop hurts, and the loop tightens. That is why the physical side, soft poop, matters as much as the emotional side at three.