A big part of Mathematics is about abstracting out some general properties and see what can be inferred from them. If a result can be obtained from some general property, then it works for every single thing that satisfies those properties, and does not need to be shown for every single case.
For your instance, if we can show that something holds for a general "equivalent-to-donut" thing, then it holds for a donut, as well as a coffee mug. For a specific instance, let me digress a bit. You might have heard of the four color problem, that is, how many colors are always sufficient to color a flat map? If you ask the same question for maps drawn on donuts, or on coffee mugs, the problem is easier, and the answer is known to be 7. That you don't require more than 7 colors was shown for the general donut shape, and then another donut-shaped object showed that you actually need 7.
The broader a definition is, the more things it applies to, and hence the conclusions are more useful. But if a definition is too broad, it runs the risk of not being very powerful, that is, not much can be said about every object that satisfies a definition. For example, you can't say much that applies to every animal in the world, but you can probably say a lot about your own pet. At the same time, knowledge about your pet isn't very useful to others.
The notion of topological equivalence is both useful enough, and broad enough to be long-standing as one of the basic subject of study in Mathematics. The usual stretching and squeezing definition that is described is actually not the commonest form of topological equivalence used in Mathematics, since transforming a donut into a coffee cup does not require passing parts of the object through each other.