The practice stemmed from an ancient Greek myth in which the goddess of discord, Eris, was irked that she wasn’t invited to the wedding of Peleus and Thetis.
In retaliation, she through a golden apple inscribed “for the most beautiful one” into the wedding party.
Three goddesses lay claim on the apple; Hera, Athena, and Aphrodite. Paris of Troy was selected to choose the recipient. He was bribed by all three goddess, but accepted the bribe of Aphrodite who promised him the most beautiful woman on Earth, Helen of Sparta.
Since then, the apple was considered to be “sacred to Aphrodite.” Throwing an apple was the symbolic way of declaring love, and catching an apple the symbolic way of accepting love. It should be noted though, that Paris of Troy rewarding the apple to Aphrodite indirectly caused the Trojan War.