When a Pokemon is traded to another game, it usually undergoes an internal check during the trade process to make sure all the binary settings (well, Hexadecimal, but that's beside the point) is consistant.
A really poorly done hack will not pass this consistancy check & will be marked as a Bad Egg when it reaches the new game. Sadly, "well done" hacks can sometimes pass these checks, so just being able to trade is not always a good way to ensure the legitimacy of a Pokemon.
So in other words, if a Pokemon comes across as a Bad Egg, not only is it a hack it is a pretty unskilled one. If you haven't been cheating, you should be fine.