Have you been in a "Mediterranean corridor" train? It can take 6-4h to get from Valencia to Barcelona. Maybe the AVE is an outlier. And it isn't available everywhere exactly. Curious that the 2nd and 3rd biggest cities are so badly connected. The fuel it took driving alone in a car was cheaper (2018) than those trains also.
I was in Spain recently and while the trains were as pleasant/convenient as I expected, I was definitely surprised by how expensive it was. Even more so, given how (relatively) cheap the rest of the trip was.