Manufacturers like Xiaomi make per-device ROMs for each region.
So the Mi 11T will come in at least two versions, an international with Google Play, and a Chinese version.
With the security update, it will have to be fully tested twice to see if there are issues with the hardware used and due to the skin used and the added bloatware.
With 60 supported devices, that means adding the update to the rom 120 times, testing it, fixing any bugs, retesting, finally publishing, and any support questions.
People who do this should be paid, the bandwidth it costs to download updates, and support with questions should be paid. Ergo, longer support is more expensive.
Device drivers also play a role that hardware manufacturers must support, and if they break they are fixed, so you have to cover those manufacturers as well.
You can cover manufacturers with contracts, and settle that into the price of the device.
Google is working on the software side to make maintenance easier, and has already started Project Treble by separating the operating system from the manufacturer’s software, and every new version of Android goes a step further.
This allows you to back a device for the same amount of money. You see, this is happening now. Samsung has been secretly offering support for several models for a longer period of time guaranteed, but it has made it official, and Xiaomi will now feel the water with its 11T models whether that will affect sales.
Technically, what Germany wants is good with 7 years of support, the Android version gets 5 years of security updates, so with 2 to 3 upgrades, and after the last 4 to 5 years of security updates, the device can last for 7 years .