That's probably because Samurott's Attack was risen.
If the move you used when you hurt yourself in confusion was Physical, that means due to Swagger Sharply raising Samurott's Attack, it gave itself more damage when it hurt itself in Confusion. Confusion damage takes raises/decreases to your stats into full account.