Huernia loesneriana is a Stapeliad, meaning that it is pollinated by flies and the flowers stink. The smell is usually something like that of a dead mouse and one common name for them is Carrion Flower. Stapeliads are like orchids in that they trick their pollinators into doing the work and the insect does not get any reward for the task such as pollen or nectar. The flies are attracted by the smell and wander all over the flower, causing pollen to attach itself to the legs or mouthparts of the flies. This is then carried to the next flower and pollination can occur. You can see the tiny "teeth" on this flower, which is make it hard for the fly to leave. In it's struggles, it acquires the pollen sacs.
The seed horns take about a year to form and the seeds to ripen, so this is last year's seed. Once the horns split open, the seed is dispersed by the wind and if a seed lands in a suitable place, such as under a bush or in a crack in the rocks, it will germinate and form a new colony.
Growing in between rocks protects these plants from fires although the grey patches on some of these stems show that they do get burned.
Stapeliads belong to the Asclepiad or Milkweed family, meaning that they have a sticky, toxic latex sap which is irritating to skin. This protects them from being eaten by herbivores. They generally aren't used medicinally but collectors like to grow them. I grow this family plants although I keep them outside because of the smell. I often get asked why on earth anyone would grow smelly plants but it's different strokes for different folks, I guess. I think that they are beautiful and once these seed horns are ripe, I'll definitely harvest some seed and try growing these at home. It is illegal to collect plants from the wild without a permit, for the simple reason that many wild plants don't survive being transplanted and people who collect them to grow have made many wild populations of plants extinct.
Further reading:
https://en.wikipedia.org/wiki/Asclepiadoideae
http://pza.sanbi.org/stapelia
http://www.cactus-mall.com/stapeliad/pollin.html