Yesterday I was watching a movie where I saw the use of this phrase "came by", but I felt it was easily replaceable with only "came". Please suggest whether they are replaceable or if there are uses which are specific.
Example: I _____ to wish you luck for your exam.
Why should it have the preposition after?