Obama taught constitutional law at the University of Chicago. He spoke passionately about the dangers of domestic spying programs and against the Patriot Act. Maybe he was lying the entire time just to be elected, but he was extremely convincing.
Personally, I suspect that once in office he was either shown something that scared him so much that it genuinely made him believe that violating the rights of every American citizen was necessary, or he was strong armed into supporting what they were doing and expanding their abuses. I imagine the NSA had no shortage of dirt on him and his family just as they must have on every politician, CEO, parent, and child in the country.
I feel like this is a reasonable but nearly-impossible-to-prove take. Maybe this is why everything goes uniparty.