But couldn't it be possible that Spanish people might use an English installation of the browser (because of some other reason), yet they obviously still want their local websites in the native Spanish, not some questionable translation of it?
It could be entirely possible. But at least the user controls this and makes this choice - they choose to set their language preference to English (because of some other reason). If they want to view a Spanish website in Spanish, they can set their language to Spanish and re-request the site, and they should get the Spanish version. It's inconvenient, sure, but setting the site to show Spanish purely based on the IP address causes worse problems for people.
For example: I'm English, and live in Berlin. If I use a VPN to set my IP address to the UK, I get an English version of <site>. But if I then set my German address, <site> complains that I'm not on the German version of the site. If I change to the German version, then there's no option to set English. I have no control over this - there's no option available for "I speak English, but have a German address".