Registering a trademark is not mandatory; however, it gives you exclusive rights to use your business' name/logo in context of the goods and services you are offering, and means to enforce those rights.
There are a few cases when a business might not need a trademark, such as a locally operating hair salon. However, if the salon turned into a franchise, it would make sense trademarking it. Building a franchise means building a brand that signals a certain level of quality to the customer and it's exactly the brand and the goodwill acquired amongst its customers that worth protecting.
Please bear in mind that this example doesn't mean that whether or not one should consider getting a trademark depends solely on the business size. Trademarks aren't just for bigger companies. Even a single-person-runned eshop or Amazon store might encounter infringement which could endanger their profits and good reputation.
If you want to learn more, we've written an article about 10 reasons for registering a trademark.