Usual Android phones' support is bounded by Qualcomm's commitment, which had been 3 years. I think they now have extended it to 4 years though. This is one of the biggest motivation of why Google is developing its own silicon.
(Added) Of course, this doesn't explain why Samsung doesn't provide longer support. And I also don't know the reason but I guess their mobile division perhaps doesn't have enough power to negotiate against its chip division...
(Added) Of course, this doesn't explain why Samsung doesn't provide longer support. And I also don't know the reason but I guess their mobile division perhaps doesn't have enough power to negotiate against its chip division...