The pigs milked them and they feel pressured by Napoleon and Squealer to say it was Snowball.
In chapter 7 of Animal Farm, the animals confess to their crimes out of fear and because they think that doing so will result in more lenient treatment from Napoleon.