An unquestionably constitutional alternative to the individual mandate policy is to give out a tax credit for everyone who purchases health insurance. It'd be effectively the same as the $700 "penalty" for not purchasing health insurance called for under Obamacare.
But that would have been scored horrendously by the CBO. It would have skyrocketed the budgetary cost of the bill and made it untenable. The solution to that would be to raise taxes enough to offset the budget impact of the tax credits. But the Democrats didn't want to run the political risk of being accused of a massive tax hike.
It's been easy to see the equivalence between the mandate and the tax-credit strategy: the Obama Administration tried to defend the mandate in court under the taxing power of Congress before falling back on the current Commerce Clause argument.
The mandate was the tricky way around the alternatives. The Democrats could force people who didn't buy insurance to pay a "fine" while avoiding any messy tax and budget implications. They likely anticipated constitutional challenges but thought they'd be easily slapped away because the courts wouldn't dare trifle with Obama's signature achievement.