Google (
https://www.campus.co/madrid/en) and I believe because they want to encourage (and then seed) local startups.
I'm sure there are other free alternatives (coffee shops etc.) but to be fair I think there are proper paid ones for not that much if you don't require your own permanent desk.