It's always a collective management decision in terms of who they decide to employ and who they decide to reject.
In Germany, it's a bit different that even if they do not personally connect, click, gel, warm to or even like you during the interview, if they however feel that you are the best very person and strongest candidate for the role based purely on your skills, qualifications and experience, they will then give you the job as they feel you deserve the role.
However, it's a bit more hazy here.
Suitability, capability, team fit, usefulness, potential performance, or even delving into the whole realm of psychology in terms of Britain's Got Talent or the X Factor in terms of the Aeroplane Test (do I wish to be stuck with this person for 8 hours in a departure lounge) or do you make me feel good about you, are right for me, deliver and tick for the right boxes for me when feeling good about myself et al?
In a sense, it's like playing a game.
But more to the point, is the main factor that separates a candidate who always walked away with and obtained a job offer, and one which always walked away with and received a 'I regret to be the bearer of bad news' email was that all things equal, although you demonstrated your ability, they essentially still did not like you enough to actually employ?