With each new app that you install, the number of apps running in the background increases. As the number of background apps increase, the phone might slow down.
The Android software is an open source software that can run on different devices. Because the phone's hardware was manufactured by a different manufacturer than that of the operating system, many Android phones have poor hardware-software integration. See why the IOS isn't open source.
As apps update themselves, they can install new versions that are more resource consuming. This can result in slowing down the phone.
Apple restricts many of the operations and even installations that could slow down the device, whereas the open nature of the android system can force the phone to slow down dramatically if the wrong things are done. See also how to speed up an Android phone.
Solid-state drives slow down when they are full. As the phone storage becomes full, the device will slow down and the performance will be reduced.
Solid-sate drives slow over time because flash memory cells must be cleared before they can be written again. The problem was fixed in Android 4.3 which introduced TRIM that clears the cells that used to contain files that were deleted.
The Android operating system doesn't give a high priority to the UI, but instead treats it as a normal thread. When any app uses much processing power, the UI slows down.
Android was coded using Java which is a resource intensive language that can easily consume up memory and so result in slowing down of the device. See also why some people don't like Android phones.
The custom software added by each hardware manufacturer that uses the Android operating system contributes to slowing down the device.
The Play Store has many low quality unoptimized apps. Because Android doesn't do the strict filtering of apps that apple does, the Play Store ends up with many apps that can slow the phone even more. See also why apps get rejected by Apple.
The NAND/NOR flash memory many devices use has a limited life cycle and it tends to slow down as time passes.
Bad Custom UI such as the Samsung touchwiz also contributes to the slowing down of the phone. If the UI has problems, the phone can easily slow down. See why Apple is better than Samsung.
If any of the internal components become damaged, it might result in a slow phone. The older the phone, the more likely this is to happen.
Some operating systems slow down intentionally if the phone's temperature rises. If the phone's temperature went up, the processing might slow down if the operating system has a function that does that.