The desire to gain natural resources, ports, and markets was not simply economic. It was viewed as a matter of national security, as the "dash for colonies" of the late nineteenth century indicates.
Beyond that, though, the missionary zeal was fairly strong in many western nations. We tend to view it as hypocritical today, but in its context, it was a powerful force, especially for middle class people. Also intricately interwoven with evangelicalism was the progressive desire to improve people's lives. That many of those peoples didn't necessarily welcome these improvements, and that many of the problems imperialists thought needed to be solved were related to imperialism itself, doesn't seem to have occurred to them.