Happy birthday, and many happy returns of the day. (That’s the full expression.) I interpret this to mean: may this day (your birthday) happily return many times—in other words, may you live to see many happy birthdays still to come.
Same with any other kind of anniversary: may the date return many times in your future life, and happily so.
I am there with @Jeruba I remember my great aunty using it every birthday and it took a long time before I questioned it. She told me the same thing. It is amazing what we accept without question for such a long time though, and we say so many things like that without actually understanding why!
@Jeruba ‘s explication is the way I’ve always understood it, but there’s an alternative view that “returns” is being used in the sense of “good things” or “blessings”, the way we now say “return on investment”. In other words, “May the day bring many good things your way”.