In a technical legal sense that's sometimes true. In reality, Microsoft will pursue you aggressively until you capitulate. In that sense, you have a very big issue.
The less common the name, the less likely you are to skirt by without issue in such a scenario. You could name your candles, Apple Candles, and be on pretty good footing (Apple is likely to leave you alone even at scale, so long as you maintain very strict separation from what they do and their branding). If you name your candles, Google Candles, Google will figure out a way to stop you if you ever get big enough to show up on their radar.
In the case of Microsoft (or Google), their name is unique enough that the USPTO is very likely to find against you for combining that unique name in as part of your new business name. You won't be able to get or defend a trademark on Microsoft Shoes, and Microsoft will shut your use down accordingly.
Most often, the category separation concept works so long as the naming is at least semi-generic, such as Apple Candles or Apple Shoes. It won't work for Pepsi Shoes.