According to my understanding, technical debt arises when shortcuts like bad design or code are introduced to gain a quick advantage for the short term.
Per the Scrum Glossary,
Technical Debt: the typically unpredictable overhead of maintaining the product, often caused by less than ideal design decisions, contributing to the total cost of ownership. May exist unintentionally in the Increment or introduced purposefully to realize value earlier.