As long as there are laws that allow companies to dodge taxes, and as long as the government allows them to do so... doesn't sound very surprising.
With the current economy, if you were running a company competing on the free market with other companies, wouldn't you rather save 4B dollars than spend them? Even if I really dislike this kind of behavior and consider it amoral, it's not only convenient for the company, it's sort of your duty toward the shareholders and as a good administrator to save money and increase gains, if there's a legal way to do so. Again, as much as I dislike it, it's not your duty to worry about the consequences for your state - the state and the government should worry (and act) based on that.
The State of Washington decided it was better to leave 4B dollars to Microsoft (and other companies...) by reducing taxes and allow them to dodge them from Nevada? Than to spend 4B on schools and instructions? seems to me that's a matter residents of that state should sort out.