The technical reason is that Bitcoin has inherent problems due to its design, and people feel they can improve on it. For example, Bitcoin transactions have high fees and can take a significant amount of time to process, so some altcoins are designed to have lower fees and faster processing times. The proof of work requirement that requires a ridiculous amount of energy usage could be replaced with a different verification method, making the new altcoin more efficient and saving all the worlds energy from being sucked up to mine Bitcoin the way nanobots may one day suck up all the worlds matter in a grey goo nightmare scenario. Some altcoins, like Monero, are more anonymous by design, which attracts people who want to buy drugs online, for example. People who like the idea of cryptocurrency but think Bitcoin has serious technical problems are attracted to altcoins as a solution.
You can read more here :
https://www.howtogeek.com/341972/what-are-altcoins-and-why-do-they-exist/