They can soak up water and store it for long periods of time. This process keeps them hydrated for entire seasons. Birds also take advantage of this, when they can find water themselves, they peck holes in the cactus, even build their nests in the caverns of them. It also provides shade from the harmful rays of the desert sun. Most plants don't have this feature. Many people think the thorns are to protect the cacti, really they are for collecting dew at night. As an added bonus, evolution has made them sharp, to defend the cactus from hungry creatures.