You actually think that Roddenberry didn't want to make money? You know what else was popular at that time? Space exploration. You know who America's newest heroes were? Astronauts. So a show taking the tropes of Westerns set in space would be something the execs would look at. They liked it enough to green light a second pilot. A somewhat unusual move in those days. To quote Khan, " I know something of those years. Remember, it was a time of great dreams, of great aspiration".