But Apple does not support macOS for most Macs that long. E.g. last year's Mojave does not support iMacs from before 2012. You may be lucky and they might support the iMac Pro a bit longer, but it is unlikely that you'll get an up-to-date secure OS for ten years.
If they transition to ARM at some point, the lifetimes of Intel Macs may even be shorter.
If they transition to ARM at some point, the lifetimes of Intel Macs may even be shorter.