Actually, Walmart gives away a lot more than Target does. Target's promised $1B over three years, Walmart gives away $1B every year to hunger charities, about 1/3 cash, 2/3 goods. The Chronicle of Philanthropy says Walmart is the #1 corporate donor in the US, ahead of Goldman Sachs, Exxon Mobil, Wells Fargo, and so forth. Target is #8 by amount donated, giving away 4.7% of pretax profit in 2011, ahead percentage-wise of Walmart's 4.1% and way ahead of the rest of the top ten.
I agree it would be better overall if the US provided enough direct funding to schools to run them well like, you know, Finland and all those other EU countries. (The outstanding results in Finland turn out to be due to making all the schools equal, not to rewarding exceptional performance, by the way.) But one of the effects of our decentralized education system is that some districts are a lot richer than others, and different districts have very different priorities, foreign languages vs. football, say. In the absence of more coherent education funding, corporate philanthropy fills part of the gap.
The US is also unusual in that we provide a lot of services through private charities, e.g. soup kitchens run by churches rather than by the government. Corporate giving has always been a part of that, and if you look back before the Reagan "greed is good" era, corporations were generally expected to behave in socially responsible ways, including corporate charity. One of the advantages of living in a rich country is that we can afford to be economically inefficient. Absolute economic efficiency is pretty cruel, the least productive people with below subsistence pay so you have starving beggars in the street, injured people who can't pay for medical treatment die, and so forth. Minimum wages and medical insurance are inefficient and expensive, but they also make a country a much more pleasant place to live. Corporate charity is part of that inefficiency.
Be careful what you wish for. In this case I don't think you'd like it.