In medicine we pick an end date for testing.
For example we know some of our products will be good for 50 years or more.
However we test to 10 years because if the product sells that slowly then it should be discontinued.
So shelf-life does have a marketing component, but it is tested to a point typically less than its actual life span. So that part is scientific, there are ASTM testing standards.
That’s accelerated obsolescence. Marketing 101.