Web shells are often the result of a successful attack that exploits a web vulnerability. They can be extremely dangerous, as they allow attackers to maintain a persistent presence and develop their attack further, for example, by elevating their privileges.
Read more about privilege escalation and privilege elevation.