Why does 喜欢 go before 跟 in 他喜欢跟她在一起?
他喜欢跟她在一起.

Grammatically, we understand it as 他/喜欢/[跟她][在一起].
他: Subject(主语)
喜欢: Predicate(谓语)
跟她在一起: Object(宾语)
跟她 is a prepositional phrase modifying the verbal phrase 在一起.
Semantically, the sentence means he likes being together with her.
跟她: with her
在一起: being together
他喜欢: he likes