As I understand from my trip to Mexico many years ago the tradition started when people put a slice of lime in the opening of the can or bottle to keep the flies out.
then either clean the place up or give me the cap to cover the top, don't spoil the beer... i think it stated in the 80's as a marketing ploy, also i've read it's to cover skunky beer taste to killing germs on the bottle mouth
strangely enough, or not, Corona will not answer any questions on why it's advertized with lime
and somebody should tell the US beer companies making "lime beer" that hygiene isn't an issue in America