I recently read that a pineapple is classified as a berry. Is this correct? If so, why?

Pineapple, as shown by Aesiron is a multiple fruit, as is the mulberry.

Botanically speaking, bramble berries (blackberries, raspberries etc) are not berries either but aggregate fruits, several ovaries from one flower, as opposed to the multiple fruit with several ovaries from several flowers.

Real berries include some fruits from the families Solanaceae (tomato, eppplant) and Ericaceae( blueberry, cranberry).

Interestingly enough, two specialized types of berry exist. The Hesperidium, i.e. citrus fruits, and the Pepo, i.e. Cucurbits such as pumpkin, squash and melons.