Baseball came to Japan in the early Meiji period from the United States, and at first there was no standard Japanese term for it. People used descriptive phrases or phonetic approximations like ベースボール, and different groups experimented with translations.
The commonly accepted origin of 野球 as the translation of "baseball" is credited to 中馬庚 (ちゅうまん かなえ / ちゅうま かのえ) around 1894 (Meiji 27).
It presumably stuck around because it was early, academic, widely printed, and aligned with Meiji-era kanji translation culture. It just feels "native" at this point.
PS: There is no rule in Japanese that says "loanwords must be katakana". That's just a strong tendency in modern usage.