Why/Why not?
However, I question whether using photography to do so is worth it.
Years ago, when I was young, poor, and full of energy I used my camera to earn some money. I worked for newspapers and sold things to magazines and photographed families and weddings. I photographed some events. I even did some food photography for a company. It was very time-consuming and involved a lot of driving. Here is the significant thing - I DID NOT MAKE A LOT OF MONEY! Only about 65 percent of what I did make was pure profit.
I did gain in other ways. I experienced a lot and I learned a lot. I learned how to make good photos in a wide variety of lighting situations and in many different settings/locations. These were the days of film. I suppose today's digital advantages might make it a bit easier. Though, I think equipment costs would be much higher now. During the time I did photography, I was also writing some things for publication along with photos.
I met a Michigan photographer at one of the outdoor art fairs one summer and, during a slow period, I was able to enjoy a long discussion about photography. This individual told me that he uses the display/sale of his photographs as a way to advertise his photo tours. The income he gets from photo sales was the smaller portion of his annual income. Much more of his income was made by providing photographic tours (he took people to South Africa and other exotic locations).
I did get a job as a photographer for a newspaper in East St. Louis and worked there for one year. After I did full-time photography for a while, I needed a better income. I was fortunate to stay in the publishing business and got a job with DOD working technical publications for the US Army. I ended up managing publications for the US Army for more than 30 years.
So, back to the original topic. Why would someone want to earn money doing photography? I understand some of the reasons. You are your own boss and you control your work. It can be creative. It can be rewarding. Photography provides a very interesting challenge. It can be fun!
But it is a business and after the initial excitement passes, the whole point is to earn a living. That can be difficult. Like other businesses, such as real estate, a few people emerge with the skills and willingness to put in the hours to be very successful. Advertising can be expensive and difficult, but it is needed. Many people find real success difficult to sustain. I meet photographers that seem to be in the business. Many of them are not earning the kind of money they would like to. And many have another source of income as well. It can be very hard to earn enough money to live comfortably doing photography.
Why then, do some people avoid making money in photography and pursue it as a hobby. I feel like I understand the reasons - I avoid mixing photography and making money! It can become boring shooting portraits or weddings for pay. Customer satisfaction can overcome the creative art of creating the images. It can be frustrating when you cannot please your customer. Simple repetition - creating the same or similar photos day after day can take the enjoyment out of your photography. You may be limited to only a few locations due to costs, time, distance, weather, customer preferences. Taking photographs in the same places over and over can become a drag. Simply getting paid can become hard work. Promoting and advertising yourself and your work can and does take a lot of time and energy away from the photography. If your photos are more about other subjects than people (racing, sports, music, events, real estate, etc.), it can be frustrating and difficult selling the photographs.
Bottom line: My photography became more rewarding when I began avoiding selling the photos I make. For me, the work involved in trying to earn some money was not worth it. Too little profit and too much frustration.