Are the people that were queried by Pew ignorant, as so many want to argue now? I don't think so. The question of his religion choice controversy, was of his own making. Personally, I don't think he's religious, at all. Not Christian, not Muslim.
It's probably partially his own fault for his "mis-speak" to Stephanopolous on the air, partially the fact that his father was Muslim and he (the prez) spent a considerable part of his childhood in Indonesia, and partially just that Americans are rather suspicious and untrusting in general when it comes to politicians.