I didn't. I was 10 years old. I disagreed with something I read in the press. My late father told me to write a rebuttal. I did. It was published. For years I wrote simply because I had something to say. No other reason. I was always published. This was in the days of print.
However, I started writing for money in 1995. And since then I only write for money.
I do think some people don't write for money. They are writing for recognistion. They are lonely. They feel inadequate. Having someone read them makes that feeling go away.
The reason some tell you not to write for money is because it's unlikely that most will earn money from writing. And as so many people are teaching writing courses, they have to cover the fact that they know damned well there were several factors that enabled them to rise.
1. They got in early.
2. They have a talent for writing.
3. They aren't really writers so much as marketers, and their writing is there to convince you to buy their product. And they're good at it.