Did you know that…
Some cacti have thorns, and others are glochids?
The difference is that the spines are often large and very prickly, while the glochids will act like hooks. And it's little clusters of little thorns, several thorns, that will get caught in our fingers. And that's what's going to give us rashes.
The thorns at the base are leaves, they are branches. And since cacti are often in arid climates, instead of developing a beautiful leaf like other plants, they save their energy, they will disperse less moisture through thorns instead of beautiful big leaves.
So basically the leaf becomes a bud and the bud becomes a thorn.