Star Trek was created by an atheist in America in the middle of the 20th century. It was revolutionary for it's time. At a party, the actress who played Uhura told Martin Luther King she was thinking of quitting the show. He encouraged her to stay, saying it was the only show he allowed his children to watch and that it shows how things should be.
The Next Generation was built, as a show, in a formula of questioning philosophy. They used fiction to ask and explore questions. What is freedom? What is religion? Do the ends justify the means? What is life? What is conciousness? From planets with inhabitants that are basically gods offering eternal happiness in exchange for personal liberty, to machines fighting for the legal right to be classed as alive, to asking if the death of 100 justify saving 1000, to using religion to control, it explores all these things. Best yet, it does it in a way even Hamza Tortoise, slow as he is, can grasp it.
Star Trek utilises the ancient tradition of using fiction to explore fundamental truths and questions, and offers it's thoughts on the answers.
Seriously, some of Picard's speeches should be taught in philosophy and ethics classes.
And it went to shit after the Roddenberrys died. Voyager and Enterprise and the latest movies are all just action movies set in space without the moral angst, and that's why they're good TV, but not good Star Trek. Star Trek was never supposed to be about explosions and making cool stuff for people to cosplay as. Star Wars was about selling toys, sure, but Star Trek was about making you uncomfortable, making you face your inner demons.