Cores are used in composite construction to increase the moment of inertia (stiffness) of a panel & to distribute shear force between the skins. Cores are typically not considered structural members, though they can contribute to the strength.
Cores should be lightweight, stiff/rigid, resistant to shear and crushing, and resistant to a marine environment. Secondary considerations are the ease of bonding to laminate skins and price. The ability to accept screws could be considered an benefit, i.e., for bulkheads. While woods are often tempting, they are prone to swelling, rot (mold/fungus), age decay, and high weight, particularly if they become wet. Instead, a relatively inert foam core is often used.