Question: why do pineapples have small spikes?
Answer: The "thorns" on the pineapple are actually the wilted petals of the flowers from which the fruit is born. There's no real reason for them except that the flowers did, at one point, serve a purpose and when they died they remained attached to the skin.