A non-profit status is not about making revenue or not. It's a legal categorization of your company. So first, you need a company. Then you have to apply for a non-profit status with the government.
How do you apply for non-profit status? I don't know, you'll probably need to hire a lawyer specialized in non-profit registration to guide you through that process. It's also not a one-time thing: in order to maintain your non-profit status, you have to convince the government every year that you still are a non-profit.
You're confusing the means with the goal. You don't need non-profit to be benevolent. You can have crazy profits by day and spend those profits on benevolent activities by night. You can build wells in Ethiopia, send vaccines to Nigeria or any other thing that non-profits do without being a registered non-profit. You can think of non-profits as a way for rich people to do benevolent things (via donations) without spending time actually doing those things (i.e. rich person signs a check, a non-profit does the work of sending a malaria net to africa).
So why people register for non-profit status? First because it gives them a preferential treatment from government in terms of lower taxes (?), ability to fund-raise money that is tax-deductible for the donor etc. I'm sure few google searches will direct you to a much more extensive information.
Given preferential treatment why won't every company register as a non-profit? Because government doesn't give that treatment to just anybody. There is a checklist of things that a non-profit can and cannot do. If you're Locke, you won't like being a non-profit.
That partially answers your "fundraising vs. investment" question. I'm guessing that "investment" is not even on the table for non-profits due to government rules so they can either earn their money or do fundraising. If you think, however, that fundraising is easier than making money, then you're probably wrong, but that's a whole new topic.
Why do people register for non-profit status? - Donations are not treated as income - No taxes on revenue raised and spent on charitable activities (taxes on UBIT are same as for-profit rates) - Certain types of non-profits, i.e., 501(c)(3) non-profits can receive tax deductible donations (but donations to any other non-profits are not tax deductible) - Non-profit status is required for most private foundation and government grants for charitable activities.
You are right about donations vs. investment. Non-profits must constantly raise money from a variety of sources in the form of grants or donations. To avoid "private foundation" status, that money must be raised from a variety of sources. (A private foundation is a type of non-profit with burdensome compliance requirements and restrictive related-party transaction rules.) A non-profit can charge for the services/products it provides, but generally must charge at- or below-cost rates.
Also, salaries and compensation to employees is significantly more burdensome. You have all of the same compliance requirements as a normal for-profit company, but you must also justify the salaries and benefits paid to your officers or generally, any employee making more than $50,000.
Finally, there are restrictions on what a non-profit can do. Money and property donated to a non-profit cannot be given to any of its employees, officers, or donors. It must be used/liquidated in furtherance of the non-profit's mission or given to another non-profit. Political activities can result in the loss of 501(c)(3) status (which means no tax-free donations, but the non-profit otherwise retains its non-profit status). Related party transactions can trigger loss of status, fines, penalties, and jailtime.
However, if you want to make money and still do good, you can follow in the footsteps of Californian companies like Patagonia and register as a "B" corporation. (There are benefits to registering in California.) B corporations can spend money on charitable purposes without the risk of a shareholder lawsuit. Only a handful of other states offer B corporation status; Delaware is not one of them.