Islamic knowledge is the key to success in the hereafter. Allah said in the Quran..
O you who have believed, protect yourselves and your families from a Fire whose fuel is people and stones, over which are [appointed] angels, harsh and severe; they do not disobey Allah in what He commands them but do what they are commanded.
Worship requires knowledge; good intentions are not enough. If good intentions were enough, then where would be no need for prophets to teach Islam. In fact, someone who commits a sin out of ignorance has two sins: one for committing it and one for not having learned. When society is full of such people it leads to disaster in this life and the next.