Answer
This says that having chitin is an ancestral trait which has been modified for different purposes in the fungi (cell wall material) and the invertebrates (shell/skeleton).
Work Step by Step
Evolution makes use of preexisting features which it modifies over time for widely varying purposes, as seen here. The hint is that chitin is shared between two large groups (animals, fungi), so it must have been present in their common ancestor among the protists and modified from there.