I've seen very different organs: pipe organs, bubble organs, electric organs, steam organs and etc.
Why do some have one keyboard while others have two-three or even more?
Music: Practice & Theory Stack Exchange is a question and answer site for musicians, students, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
So you can play two, or three, or four different sounds at the same time. Like a split-keyboard on a synthesizer.
Note that many professional keyboard players have several keyboards on stage that they can play at the same time.
Regarding old-world pipe organs, there are many aspects of European churches that are meant to be grand, impressive, imposing, and awe-inspiring. The Catholic Church has gathered vast amounts of wealth in their history, and one of the uses of that wealth has been to gather and inspire congregations.
As music is an important part of worship, it has been part of the missions of churches throughout the centuries to provide high quality music (that continues to this day with modern instruments and technology). The peak of music production for a few hundred years was certainly the pipe organ.
As the technology evolved, churches wanted more pipes, more stops, and just basically more sound. Getting a whole orchestra and their instruments together was not easy. Finding a capable keyboard player and putting all the sounds of a full orchestra at their fingertips was less of a challenge.
As the number of pipes and stops grew, and as churches grew larger and had larger congregations, it became desirable to have bigger and bigger sounds from the organs. With multiple manuals (the organ term for keyboards), the organist can both create layers of sounds for richer textures, as well as switch between different sounds rapidly.
Multiple manuals add to the cost and weight. For smaller organs or even portable organs, multiple manuals are often too much of a liability. Pipe organs that are not going anywhere might as well have as many bells and whistles (literally!) as the church can afford, so having five manuals plus the pedals is justified.