I haven't researched bakery waste but I would have thought it is perfectly possible to get a license to use bakery waste for pigs. You would presumeably need some authorisation that the bakery's processes give no risk of contamination by animal products - if they just make bread products that would be ok, I would have thought.
I had a friend in Exmoor who reared rare breed pork for his local butcher. Yes some of them were crosses, but the boar was a Saddleback and so were some of the sows, and some were OSB or OSB crosses - all the breeds in the crosses were rare breed, just like my own OSB x Saddlebacks. He had an arrangement with his local, very large Sainsburys, whereby he collected unsold food twice a week. The manager was very supportive of the food going to be used rather than going to landfill (and I am sure got a regular supply of top-quality rare breed pork!), so was happy to instruct all his staff about handling any food that had any meat in it differently. They stacked all the unsold bread, cakes (but not sandwiches or pies), fruit, veg, even flowers, in one area of the yard and everything else the other side. The latter went to landfill, my friend picked up a trailer-full twice a week from the other. Often there was so much he couldn't take it all, so then he'd pick through and take the stuff they'd like the most and would be best for them and the supermarket would send the remainder to landfill.
We'd sort the potatoes and parsnips out for boiling, the bread one way, any onions, leeks etc, and some of the citrus fruit if there was a lot, went onto the compost heap (and the Muscovies picked through that), and the rest would be used up as you came to it.
Twice a day every adult pig and each batch of growers got a crate with a portion of boiled spuds and parsnips, a couple of loaves of bread or equivalent, a bunch of bananas and a variety of other fruit & veg. He fed some pellets to lactating sows and their piglets, and to finishers, but other than that all the feed came from the supermarket waste.
He had the process off to a T and had a regular outlet for his Saddleback X rare breed pork.
I can't have the number of pigs he did, we haven't suitable ground, and I haven't managed to find a small supermarket or veg shop who doesn't already have an outlet for their waste (or can't store it so can't hold it for me to collect
) but I live in hope of being able to feed my pigs a more varied and exciting diet!
These pigs were so used to a huge variety in their feed, I once had a couple of them pretty much say, "What, mangoes again? We had mangoes this morning
and yesterday - haven't you got anything different?"