In Spanish there is the structure "Me gusta" where "Me" is the object. But in other Romance languages such as Portuguese "Eu gosto (de isso)" or French "Je goûterai le soir bleu", "eu" and "je" are the subjects. Those words seem to all have evolved from the Latin word "gustare", so why in Spanish the structure was changed? What could be the historical evolution of this expression?
Consider another sensory verb (because that's what gustar originated as) oler:
- Huelo algo terrible.
I smell ( = perceive sensorily) something terrible
- Huelo a algo terrible
I smell ( = emit an odor) something terrible.
- Algo me huele a algo terrible
Something smells terrible to me == I smell something terrible
Notice how fluidly the meaning changes depending on whether there's a preposition or not, and then when used with an indirect object, there are two ways to interpret it.
At some point, gustar changed from meaning merely to taste/experience to pick up an enjoyable/pleasurable connotation (probably via the noun gusto with a likely semantic drift of flavor → (good) taste → affinity), at which gustar meant something akin to tener/hacer gusto rather than saborear/probar. Consider the structures possible of gustar if we select different words along gusto's semantic progression:
- Tengo gusto de algo
I have an affinity for something
- Algo tiene gusto para mí.
Something has a good taste for me.
To wit, in Modern Spanish, we have all of these meanings of gusto per the DRAE (23rd edition, ellipsis not noted):
gusto: 3. Placer o deleite que se experimenta con algún motivo, o se recibe de cualquier cosa || 4. Facultad de sentir o apreciar lo bello o lo feo || 7. Cualidad, forma o manera que hace bello o feo algo || 12. Afición o inclinación por algo.
The traditional meaning of gustar is preserved in the transitive use of gustar:
- Gusto algo
I try/taste something
The idea of providing such a pleasurable sensation (meanings 3 and 7, primarily) comes in the intransitive that virtually always comes with an indirect object:
- Me gusta algo
Something has a nice quality / is pleasurable for me.
And then the meanings seen in 4 and 12 (being able to appreciate something or having an inclination towards it) also took an intransitive use, but with a preposición de régimen:
- Gusto de algo
I appreciate / take pleasure in / am a connoisseur of something.
There's not a huge difference in practical meaning at the end of the day between the latter two uses, and it's probably random chance which language went which direction as its primary use. Consider the modern languages of the Western Iberian branch of Romance languages:
- gosto de algo (PT)
- gusto de algo (GL)
- gusto d'algo (MWL)
- gústame dalgo (AST)1
- me gusta algo (ES)
The Galician-Portuguese branch went with gustar de structure, the Castilian branch went with gustarle structure, and the Leonese branch split the difference.
Aragonese (also West Iberian) and Catalan (an Occitano-Romance language) ended up using a similar structure with indirect objects, but with different verbs — m'agrada alguna cosa (CAT), me faz goyo bella cosa (AN) —2 so it may simply be (though this would be speculation and also vastly over simplifying things) that Castilian ended up sandwiched between languages that preferred an indirect object to express the idea of liking something, and languages that liked to use the verb gustar to express that concept.
But remember that asking why when talking about changes in language is a relatively useless question. The answer is almost "because that's what people said/did" :-)
1. The verb prestar is more common (préstame dalgo, "dalgo" is Asturian for "algo" and not a fusion of "de" and "algo"), but gustar does exit. 2. In Catalan gustar only has its transitive meaning of to taste, and Aragonese lacks gustar entirely (favoring tastar, which also exists in Catalan and used to exist in Castilian).
In Spanish it is possible, although uncommon, for the word "gustar" to have the same syntax as in Portuguese. Here is a passage from the Spanish Wiktionary article on gustar:
Si se desea que la persona que siente el placer sea el sujeto, generalmente para usos literarios o cultos, el verbo va seguido de la preposición de: "gustamos de esa casa".
If it is desired that the person who feels the pleasure be the subject, generally for literary or educated uses, the verb is followed by the preposition de: "we like that house".
Here is an example I found on Google books:
Yo gusto, esposa mía, del contento que recibís en vuestras obras santas, y de ellas gano yo el merecimiento...
Unfortunately I cannot give a better answer. I am unable to find the origin of both uses of the word "gustar/gostar" to mean "to like". The word itself comes from the Latin word for "to taste", "gustare". I am also unable to find out which syntax of the verb "gustar/gostar" to mean "to like" originated first.
John McWhorter PhD Linguistics (Stanford) expounds this:
The Power of Babel (2003), p. 125 Bottom.
Another example is how languages mark subjects when the topic has to do with experience rather than action. When we learn Spanish, one construction we have to pause to wrap our heads around is that I like books is Me gustan los libros “the books please me” rather than what we would “ expect,” “Yo gusto los libros.” In Spanish, you say not that you like something but that it “ pleases to you,” and thus “ to me please the books.” This is not a mere random quirk— it follows from a distinction in types of object that English just happens not to mark explicitly very much.
We get a handle on the distinction in question with the gustar case: technically speaking, books in I like books is an “ object.” But book is an object in a different way in I like books than in, say, I read books. To like a book is not really to do anything to it-in contrast with reading a book, you can like a book without touching it; if you say you like a book, then you are actually describing a sentiment, not an action. It is not accidental that Spanish has the “ to me” construction with like, a verb describing a kind of experience, and not with, say, drive.
For an English speaker, for example, something always a nuisance in Spanish is how to say like. It comes out as that some-thing "pleases to you": I like apples is Me gustan las manzanas, "to-me please the apples." It's a very specified thing about Span-ish, attending to the technicality that while to eat something is to do something to it, to like it is to experience it—i.e., for some- thing to happen to you. The way an English speaker would like it to go is something like Yo gusto las manzanas, to bring it into line with our way of rendering liking, a less specified way of put- ting it. It's a typical Spanish-class mistake. But because a stu- dent has a teacher coaxing him out of it, Yo gusto las manzanas goes by the wayside pretty fast for someone in a Spanish class.