So my question is: Why should getScore() check for 3 in a line?
It doesn't have to! If your search is looking for 3 in a line, you can just return a losing score when it happens: Since the 3-in-a-line condition just appeared, it must be that the opponent of the player to move won.
Tic-tac-toe is such a small game that you don't need an evaluation function at all. You can always just explore the tree to the end.