An interesting story as to how jackfruits came to have spikes is found in the Mahabharata. The folktale begins with Bhima pretending to have fever. He requested Draupadi to massage his legs.
Bhima then took large jackfruits and covered it with clothes.
Draupadi massaged the jackfruits thinking it to be the firm limbs of Bhima.
When Draupadi saw the other Pandavas laughing, she removed the clothes and discovered the jackfruits.
An embarrassed Draupadi in anger cursed the jackfruits to have spikes. Thus, jackfruits were no longer smooth.