When I was taught to write in school, my teacher told me to start with an introductory paragraph and end that paragraph with my thesis. I understand what I was writing in school was very elementary writing. But I noticed that in more sophisticated pieces of writing, I am unable to find the a thesis at the end of the first paragraph in articles from the New York Times or New York. My question is how would I go about finding the main idea or thesis of more sophisticated pieces of writing?
I think you need to understand different writing styles and types. So, for instance, in poetry, you would not expect a thesis at all, and may well need to read the entire poem to grasp the meaning or purpose. Similarly, in fiction, if they told you everything that was going to happen at the start, it would not make for a good read.
What your teacher was talking about was - broadly speaking - academic articles. This does not necessarily mean scholarly research publications, but articles whose purpose is to educate and inform. Some journalism falls into this, but a lot does not - as per @Aerovistae, journalistic articles are another writing style. Longer, serious, magazine-like articles may count.
Definitely in "proper" academic work, you need to state your thesis early on, and work towards this throughout the article/document/book. My PhD thesis needs a simple tagline, that I define at the start, and relate to throughout - my core thesis that I am setting out to prove. That is the way academic material is done.
So your teacher was right in respect of the work you were expected to do for the next 10 years through school. But it is not appropriate to apply this to all forms of writing.