No, problem not solved. Problem not recognized (by you).
Isn't this a problem, though? There are a lot of hungry people who really could use that milk. Why is it better to dump milk or meat or produce or whatever rather than to ensure that it goes to people who cannot afford to buy milk, fresh produce, meat for themselves? Why is it better to dump/waste food than to feed people?
You can't think of the problem? If food is consumed past the expiration date and someone gets sick, they could sue the company. That's one factor. The other factor is that people wouldn't go shopping. They would just say, "I'm waiting til tonight when you give it away for free."
2 problems right there off the top of my head.
You're still not getting it:
Farmers are dumping milk because they cannot sell it. Same thing with fresh produce and even meats.
Stores are dumping milk because it is unsold after expiration date. Same thing with fresh produce and even meats.
There are literally millions of people, many of them children, who are too poor to buy nutritious food such as milk and produce.
There are the same number of people (minus those tens of thousands who have died from COVID 19) who need to eat but fewer of them have the cash to purchase nutritious food.
The problem isn't that the farmers are producing too much food.
The problem is that too many people lack the resources to purchase food, many of them for the first time because they have lost their jobs due to the virus.
Good nutrition helps people avoid getting ill and also helps stop the spread of this virus and other illnesses.
Good nutrition helps people stave off obesity, diabetes and heart disease all of which make one more prone to becoming seriously ill from this virus and other viruses and diseases and drives up the cost of health care and also drives down the productivity of the work force.
Opening up businesses too soon exposes too many people to the virus.
Keeping businesses closed down helps prevent the spread of the virus.
The rational person would conclude that the government should subsidize farmers and especially poor people and newly unemployed people and make it easier for them to purchase nutritious food such as milk and fresh produce before it spoils. This is particularly true during any kind of epidemic and especially a pandemic. Don't get me wrong: it's the right thing to do any time, period. We can afford to do it. It is the moral thing to do. It would help lower the costs of health care (and education as well nourished children learn better) and boost productivity as fewer workers need to call in sick because of their own illnesses or the illnesses of their children.
It's the right thing to do: Feed people who are hungry rather than waste food. It's what decent, rational people do.