We did not repeat moves. Why was the game still drawn by repetition? #
Threefold repetition is about repeated positions, not moves. Repetition does not have to occur consecutively.
We repeated a position three times. Why was the game not drawn? #
Repetition needs to be claimed by one of the players. You can do so by pressing the button that is shown, or by offering a draw before your final repeating move. You can also configure Lichess to automatically claim repetitions for you. Additionally, fivefold repetition always immediately ends the game.