Why is Turkey part of the EU?

Some people on here know that I like to pretend to hate on Turkey. And, while trolling Turks is fun, Turkey is still a somewhat bizzare country. For example, their acceptance into the EU and NATO. Now, how exactly does this make sense? Turkey is in no way a European country; culturally, religiously, linguistically, and genetically it's very much Central Asian. How can you admit a non-European country into the EU? Am I missing something here?
Why is Turkey part of the EU?
Post Opinion