Spain is a very affordable country to visit. Other than Portugal, I found Spain to be the most affordable country to visit in western Europe.
The Spanish financial crisis (also known as the Great Spanish Depression), that began in 2008 and continues to this today, has hit the Spanish hard. At the peak of the Depression, almost a third of Spaniards were unemployed.
One of the ways in which the country has tried to recover is by relying on tourism, its 3rd largest economic sector.
The result has been a win-win situation for both the tourist and the Spanish.
As locals compete for the lucrative tourist dollars, there are plenty of affordable hotels, bodegas, restaurants, etc., on the offer. No surprise then that visitors have flocked to Spain in droves, making it the 3rd most visited country in the world last year (and on its way to becoming the second most visited). For the Spanish, the tourists are welcomed because frankly, millions of livelihoods depend on it.
Without tourism, effects of the Great Spanish Depression would have been far more devastating.