A lot of the time, it's underlying libraries and tools that are updated to fix bugs, security vulnerabilities or just because they got a new version. In the case of binaries (the thing you download as an end user; compiled code), even the smallest 1 character change in the source code, can mean you have to download the entire binary again, whether it's a 5kB binary, or a 1GB one. There are patching techniques that can work around this but they're rarely used at a binary level and usually at a "package" or "archive" level.
For performance, it's a harder one to answer, because there are potentially many reasons, I have my opinions as a Software Engineer myself, but others will have different opinions. Ultimately, software moves "forward", which can mean more code, more features, more bug fixes (and thus safety checks etc) and potentially worse performance, although _better_ performance is also possible with optimisations.
That said, as hardware advances, it enables writing more powerful software with more features, which then become more of a struggle for older hardware to run.
From a device manufacturer perspective; they want to sell you new devices, so there's little incentive for them (in my opinion) in spending developer time on trying to optimise new code for older devices.
For performance, it's a harder one to answer, because there are potentially many reasons, I have my opinions as a Software Engineer myself, but others will have different opinions. Ultimately, software moves "forward", which can mean more code, more features, more bug fixes (and thus safety checks etc) and potentially worse performance, although _better_ performance is also possible with optimisations.
That said, as hardware advances, it enables writing more powerful software with more features, which then become more of a struggle for older hardware to run.
From a device manufacturer perspective; they want to sell you new devices, so there's little incentive for them (in my opinion) in spending developer time on trying to optimise new code for older devices.