>>22768991There's a number of possible explanations for the spikes. The ones on its back and tail might've aided in stability and steering while flying at high speeds, like the tail and rudder of an airplane.
As for the other protrusions, Aerodactyl is sometimes described as having been "the king of the skies", which is a title shared with another predominantly male monster with spikes on its wings and face from a Japanese game about finding and occasionally capturing monsters.