They are all different species with different nutritional needs, you can't really feed them all the same thing and meet their needs.  It can sometimes be difficult to keep different species together for that reason.  It's very difficult to make your own feed and have it be nutritionally adequate.  I know some do it, but for most people it's just not really doable.  Different species often have different mineral needs also, and the needs of one may not be healthy for another.  Goats and sheep that eat too much chicken feed can suffer from bloat, they cannot properly digest the proteins in chicken feed, and the chickens need the protein.  Most chicken feeds contain animal sourced proteins, and those are not supposed to be fed to ruminants.   I've attached a couple of articles that might be helpful.
https://thriftyhomesteader.com/can-i-keep-sheep-and-goats-together/
https://thehipchick.com/can-chickens-eat-goat-feed/