Original Pokemon (Pokemon you caught) will always obey you.
As for traded Pokemon...
You don't need the 8th Gym Badge for Level 90 Pokemon to obey you. As long as you have 7 or more badges, all Pokemon level 90 or below will obey you.
Either that, or the trainer you got it from has the same name, same ID, and same secret ID number (1 in 4,294,967,296 chance this will happen).