Have you ever come home to find your cat sitting on the top of your fridge, or even worse, on the top of your door ledge? I certainly have and I often wondered why it is they like to climb to those awkward places, particularly up high. Originally, I thought it might be because my cat wanted to greet me at eye level which of course is impossible when they're on the ground, so they climb up to see me face to face! (How endearing!) But it's actually a much more deeper rooted reason than I thought.
Cats like to hide to feel secure, if they're not hiding, then they need to feel secure by being able to see everything around them and feel safe from any immediate threats. Being up high allows them to do this. As a cat, sitting up high means that there are no threats from above, and you can see everything happening below. It is a comforting peace of mind that drives the cat to climb to high places. Never mind trying to stop them from doing this, it is their instinct!
In-fact, many wild cats also exhibit this exact behaviour, a lion or a tiger will often sleep on the branch of a tree.
To encourage your cat to not climb on things you don't want them climbing on, make sure you provide them with enough things to perch on. This can be simple things like a high chair with a pillow or towel, or a cat tree. You can also purchase window observation decks.
The trick is to create an environment similar to what they would find in the wild which is cat friendly and give your cat the best opportunity to feel safe and secure from the comfort of a high vantage point. Giving your cat these things will build a bond between you as they will recognise that you understand their needs