Personally I think its just Narcissism and ego.
He knew Trump would dismantle his legacy and being the smartest guy in any room he walks into figured he’d show trump who was really the Boss.
Obama was never really that smart ad hopefully it will finally be his undoing.
Hope so.