Q: If a creature that was mindbugged is defeated, which discard pile does it go to? And who gets the defeated trigger?
A: The creature goes to the discard pile of the player who currently controls the creature. In the example, the player who mindbugged the creature gets the defeated trigger and the creature also goes into their discard pile.