That's a very good point. The way the human population grows in combination with the way we use the resources on Earth, it is theoretically possible that we run out of resources and need to colonize other planets. In that context, searching for a habitable planet is highly practical in the long run.
Reminds me of how Q in StarTrek says that humans are like a virus and that we infect planets.
"There... I've run rings 'round you logically" -- Monty Python's Flying Circus