Eggs float because the air bubble has enlarged with time. Also the reason they are easier to peel, the membrane separates from the shell easier with age.and then there's the famous 'floating egg' thing . . .
a truly 'bad' egg will float.
however, not every egg that floats is bad.