I think the author's orginal idea to call Stanley 'Caveman' came because he found a fossil while digging. However, do to poor editing, Stanley actually is nicknamed before he finds the fossil. This could be because of last minute changes to the sequence of events.