Since farmers act in a fairly efficient market, unless animal wellfare somehow improves the bottom line, they will be outcompeted by people who do not care about the animals. That's why we need laws that enforce minimum standards.
Morally I don't think people have the right to place the bottom line above animal welfare so I wouldn't expect them to participate in that "game". I would expect them to pack up and say, nope, that's not how I will treat animals so this is not a business I want to be in. If the business is only feasible if you treat animals badly, then it shouldn't be a business in my opinion.
But, assuming a democracy, the law is to the will of the people. The very people who you say don't care about animals. After all, if they did care about animals that efficient market that you speak of would force the farmer to comply to animal welfare by market force.
Minimum standards remain useful to weed out scammers and whatnot who still try go against the grain after the market has shifted, but the general consensus has to be on board first, and when that is the case most farmers will have no choice but to comply. Agricultural markets are, as you say, mostly efficient. Far more efficient than most realize.
Of course, the world isn't limited to democracies, so perhaps you are imagining China or something?
For at least several years now EU has direct subsidies for entrancing cow welfare. Things like free range grazing at least 120 days per year, minimal space per cow etc.
That's a bit different. That's: We have the consumer willingness to see the market shift towards having an interest in animal welfare but we'd like to reduce the onus on the poor.
They do care at the time the laws are created, else what would motivate the laws to be created? It is true that laws can often languish on the books long after sentiment has moved on.
Representative democracy simply introduces a messenger, allowing democracy to happen locally even where the people are spread over large areas. The people at the local level carry out democracy locally and the product of that is compiled with the products from other locales by the messengers. The action of the messenger is recorded to ensure that the will didn't change in transit. It doesn't introduce a dictator to invent laws for you like you seem to suggest. It is still by the action of the people.
I mean, it can introduce a dictator if the people forget to participate in democracy. Someone will rise up and take charge if everyone else completely ignores what is going on. That might be what you are imagining. But you don't really have a democracy (representative or direct) if the people are not active participants. A democracy in name only isn't actually a democracy.
While an assumption of a democracy was made for the sake of discussion, it was recognized that the world is bigger than democracy.
And as long as you still have a bottom line while reducing animal suffering, many farmers may be perfectly happy with that tradeoff.
They may see it as a win/win — they get to still run a business doing what they love, while caring for the animals they love.
And if they ultimately are more successful, maybe they reduce and/or “convert” the number of farmers that care less for their animals’ wellbeing.