It not just Samsung but the provider as well. I know of when I had my Note 4, it would take eons for updates because not only was Samsung slow with their updates but Verizon would slow the updates to a glacial pace because they wanted to add their own bloatware on top of Samsung's.
What's nice about the iPhone is that you don't get any of the bloatware and you get not only only timely but continued updates. With Android, after a couple years, most of the time, the phone no longer receives updates.