Obama could've had motives for not wanting Trump to follow him in the White House, without actually running again.
Obama may have had "footprints and fingerprints" in a number of crooked and shady areas...he could've asked for Hillary's help to cover up his mess. That could've been his "quid pro quo" for her--"I'll help you spy on Trump, you help me clean up my messes."
Obama may have also realized that a number of his Executive Orders, laws (Obamacare), and policies would be wiped out by Trump following him in the White House. Thankfully, that concern came to fruition.
Obama had enough motivation to help Hillary spy; he didn't need to be "ordered" by anyone.
So, Obama was using government employees and spy agencies to provide spy information to the Democrat Party to help them defeat candidate Trump.
I think thats against the law.