I don't think this is generally true for the guitar. There are even songs that have notes intentionally out of tune (e.g. Scar Tissue by the Red Hot Chili Peppers).
Agree with the OP that the characteristics of the guitar, including its "out of perfect tune", is what gives its music its unique characteristic. It's not a bug it's a feature. There might be some people with perfect pitch who get annoyed but for most people that's "colour" and the sound they expect and associate with their favorite music. If you played those songs on an "ideal" guitar they would not sound right.
Outside of people like van halen also pretty much no one is exploring the entire neck on a single song. So the issue of the guitar not being perfectly intonated is irrelevant since they are using just a piece of its range.
Frusciante is an amazing guitar player — check out his solo albums. He knew what he was doing putting those out of tune notes in.