Cable cars? That sounds like San Francisco.
You have two sentences. One happens to follow the other on the page. In ordinary discourse, this may well be an informative and meaningful order.
The publisher is not necessarily presenting these sentences as ordinary discourse. Instead, they may simply be presented as two independent, unrelated clauses. Establishing a relationship between these clauses is, quite literally, left as an exercise for the reader.
Either one of the original clauses could be cast as a subordinate clause:
- People who love to ride cable cars visit San Francisco.
- People who visit San Francisco love to ride the cable cars.
Both of these versions contain all the information that is contained in the original clauses. Neither of them has exactly the same meaning as ordinary discourse using two separate, ordered sentences. No matter which clause is made subordinate, the subordination creates an explicit relationship that does not exist between the two original independent clauses.
The publisher chose one correct answer. You happen to prefer another correct answer. There exists a number of other correct answers. For example:
- People that love to ride cable cars visit San Francisco.
- People such as those who visit San Francisco love to ride cable cars.
It seems that you've inferred an implicit relationship between the independent clauses, and you've written a well-formed complex sentence that makes that relationship explicit. It also seems that the publisher did not intend to imply the relationship that you've inferred. Perhaps the publisher intended to make no implication of any relationship between the clauses.
Here is my advice: Consider the publisher's answer to be one correct answer. Consider your answer to be another correct answer. Consider that there may be dozens of other answers which are also correct.
The relationship that you inferred is a sensible relationship. In ordinary discourse, I would myself infer the same relationship on the basis of the ordering of the predicates. To me, it is the most obvious implication, but it is not the only available implication and it need not be the intended implication.
tl;dr
Your answer is right, but the publisher's answer isn't wrong. Either clause can be made subordinate to the other with the use of an appropriate relative pronoun.