That’s not true; I developed a WP7 Silverlight app that worked with just minor bugfixes through Windows Mobile 10.
What they did do was bungle the marketing on it, so the public conciousness mixed up “WP7 devices can’t run WP8 apps” and “WP8 devices can’t run WP7 apps”.
WP7 itself was a throwing away of compatability with Windows Mobile apps; reportedly, that loss of goodwill is why Google refused to support the platform. WM6.5 apps would have been out of place on WP7, but if Microsoft was still yelling about developers x3, maybe they would have made that transition possible --- require a new frontend for cohesive UX, but allow for core libraries from older apps to run as-is, instead of forcing the new apis.
The loss of compatibility wasn't even the biggest issue here - it was the loss of functionality. WM6.5 had a huge enterprise feature set, only rivaled by Blackberry (and probably Nokia to an extent). Then came WP7 and had...literally nothing. They didn't even support Exchange ActiveSync in the beginning.
This was enough for a not insignificant number of devs to drop out of the already small market and lower the already limited app supply even more.
I like to think that WP7 was a smart dumb phone. I had a great UI, that I loved. And just enough smart stuff to make me happy. Maps. Unified messaging. Cortana wasnt completely enshittified yet either. Small package (L520) and I loved it.
WP8 tried to incorporate Windows 8 design features, and everything got worse. Vendors pulled out of the unified messaging. Cortana would send my maps to the advertisers address rather than closest requested. And the L525 that ran it actually went backwards in specs.
I would still, today, go back to a supported, bugfixed, WP7 in a heartbeat. And I bet there are dozens! of people just like me.
I also upgraded to Lumia 550 as my Windows Mobile 10 device and it wasn't bad either though the platform was close to its demise by that time. I eventually gave it to my Dad and got a Galaxy J7 in exchange which became my entry point to Android world.
MS were obviously caught on the back foot. WP7 was based heavily on Windows Mobile because that was all they had ready to go at the time. Then they rebooted the OS entirely with WP8 (based on NT, should have always been that way), removing backwards compatibility for existing apps and phones. Personally I gave up on Windows Phone right there and then: they'd obsoleted a phone I bought (IIRC) a little over a year previously.
You might be right that as time went on they might have made it a success. Certainly, they had the resources to keep throwing money at it until they did. But those early missteps really hurt them. You need passionate evangelists for your product, I’m only half joking when I say they should have swallowed the cost and upgraded every WP7 owners phone for free.