Remember, that the officers are also human beings...some are good at what they do, others take their sweet time. And some may be biased even unconsciously which impacts how long it takes them to process things.
These human factors (or other ones you didn't name) are certainly true - but I'm going to guess that the biggest differences are things we don't know about. First and foremost of unseen things - I'd expect are them waiting for responses from other agencies. Which usually doesn't take long - but sometimes, does.
Biggest and most obvious are likely the criminal and security checks/clearances - and may be complicated in ways that we don't see or know. (Eg someone gets a criminal record check that overlaps with someone else's name - extra time to unwind that and clarify.) Language - easy most of the time (those with up-to-date english language tests), but some evidence might need judgment; and hope your English language test wasn't from a centre that had fraud problems. Prohibitions - as weird and far-fetched as some of those might seem (war crimes?), procedures for some cases might be more onerous than outsiders would think. Physical presence - complicated ones with a lot of travel means more checking. Errors or gaps in entry/exit records - checking against other evidence (like employment?), which probably requires judgment, thought and possibly a sign-off from someone more senior. Etc.
As for the humans working on the files: we don't know how they're organized, but they probably have their most experienced officers working on the difficult files/issues. Junior ones can process a lot of files, but have to kick out or get advice for the complicated issues - meaning delays in coordination. (Probably increasingly computerized algorithms - which may or may not be called AI - giving preliminary approval for many / kicking some out of simplified procedures for further checks). Etc.
Plus there are attempts to apply without requisites and mistakes that are made on physical presence and other areas. Previous (potential) misrepresentations that may require checks or bring up issues they look at. (It would probably help if legal/political environment were such that they could occasionally cut down the requirements, or simplify ones which add inordinate amounts of staff time/costs - but alas, it's usually the opposite, with scandals and mistakes increasing demands.)
Sure, some employees are better than others. Some organizations and procedures are better than others, too (at least for some types of files). But the actual applications (profiles of applicants) differ quite a bit and there's no way they're going to be processed 'in order'.
How much these differ by officers and for reasons that are 'valid' - one can only guess. And of course, some serious screw-ups do happen (all large organizations with complicated procedures have them). But gut reaction to blame it all upon 'bad staff' leaves a lot out.
Doesn't get a lot of credit but the anecdotal comments I've heard from people who got their citizenship 10-15-20 years ago universally make it sound horrific, with major delays. But those are anecdotal, and I don't know how accurate.