They built missions in New Spain (that is, their colonies: today's Mexico and Central America, parts of Southern US) because they wanted to convert the indigenous population of America to Christianity. They did this partially from a genuine conviction and partially from the expected favors with the Pope and expected moral superiority over other countries.