Why does fresh pineapple stop jelly from setting?
Because pineapple contains bromelain, a group of enzymes that break down protein — and gelatine is a protein. The enzyme digests the very molecules that would otherwise form the gel network, so the jelly stays liquid.
Gelatine sets by forming a mesh of long protein strands that trap water. Bromelain cuts those strands into fragments too short to link up. The result is not a weak set; it is no set at all.
The fix is simple: heat the pineapple first. Bromelain is denatured by temperatures above roughly 70°C, after which it is inactive. This is exactly why tinned pineapple works perfectly well in jelly — it has been heat-treated during canning. Fresh or frozen pineapple has not, since freezing does not denature enzymes.
Several other fruits contain similar protein-digesting enzymes and cause the same problem raw: kiwi (actinidin), papaya (papain), fig (ficin), mango and guava. All are fine once cooked or tinned.
The same chemistry has a useful application. Bromelain and papain are the active ingredients in commercial meat tenderisers, and marinating meat in fresh pineapple or papaya juice genuinely does soften it. It is easy to overdo — leave meat in a pineapple marinade for hours and the surface turns unpleasantly mushy rather than tender.
It also explains why eating a lot of fresh pineapple can make your mouth feel raw. The enzyme is briefly digesting the proteins in your mouth's soft tissue. Harmless, and it stops as soon as you stop.
Agar, a seaweed-derived setting agent, is a carbohydrate rather than a protein and is unaffected by bromelain.