They thought that the whale was shifted to the mountain top by plate tectonics over a 4 million year period.. But obviously that may be a stretch:
Paleontologists discover a whale fossil on top of a mountain
Question: does the soil matrix and soil strata show evidence of other marine life? It seems that question has been met with silence.
Possibly it was surrounded by “dust?”
article from 1899
A noteworthy fact regarding these fossils is that the petrifactions of land animals are nearly all found at a much lower altitude than those of marine animals, the remains of a mastodon have come from the Santa Lucia Mountains some 300 feet above sea level, while a whales head fossil, huge petrified oysters, fish fins, barnacles and other forms of sea life were found embedded in a ridge of sandstone at least 2500 feet above the sea and a distance of eighteen miles inland. Scientists would, doubtless, be able to explain this phenomenon as a natural consequence of the change of conditions in accordance with the transition from one geological period to another.
https://clickamericana.com/topics/science-technology/fossil-whale-found-on-mountain-top-1899