Biologically speaking, mellons, water mellons are not fruits, they are vegetables, just like pumpkins (have you ever seen how they grow?). Yes, they are sweet, but not all fruits are sweet. Have you tried to eat the walnut fruit? It's awful. We eat the seed only. Oh, carrots are also sweet (I am crazy about raw carrot), are they fruits.
Pineapple is (also biologically speaking ) a herb, not a tree, but this is how they explain it in the Britannica (e.g.)
Fruit-bearing plant (Ananas comosus) of the family Bromeliaceae, native to the New World tropics and subtropics but introduced elsewhere. Pineapple is served fresh where available and in canned form worldwide. It is a key ingredient in Polynesian cuisine. Like agave and some yuccas, the plant has a rosette of 30-40 stiff, succulent leaves on a thick, fleshy stem. A determinate inflorescence forms 15-20 months after planting. After fertilization, the many lavender flowers fuse and become fleshy to form the 2-4 lb (1-2 kg) fruit. Ripening takes 5-6 months.

BTW, my parents had about ten years ago a 1ha plantation of watermellons - just for us!!! I thought I will never eat watermellons or mellons again. The next year I couldn't wait until they ripe. Also we had for three years a 0.5ha plantation of strawberries when I was still in the school, can you imagine? Hundreds of kilos just for us!!!! I miss those times. My parents are a little older now and they can't have so much work, anyway, we're not there to eat it all.