For a business expense to be deductible, it generally must be ordinary and necessary or be an investment expense. Investment-related deductions under IRC §212 have largely been eliminated by the TCJA. That puts the emphasis on deductions to be tied to a trade or business activity so that they can be deducted under §162.
The trade or business must be conducted with a profit intent. If not, the activity is deemed to be a hobby, and associated losses are nondeductible hobby losses. In general, a hobby is any activity that is not engaged in primarily for profit (i.e., any activity that is not a business). However, simply incurring net losses does not mean an activity is conducted without a profit intent.
How do you prove a profit intent?