The piles can go very deep in creating a rock socket and distribute the weight. There are different types of piles, such as bearing, friction, sheet, and diaphragm walls etc.
The site would have already had Geotechnical site investigations (I was involved in this part for Wellington Dock) and testing in labs to see how strong the rock was, what pressures the they fail at etc. Any issues with the site would have been highlighted then.
Both Sandon and Wellington Dock were backfilled with sand from Liverpool Bay as was Liverpool 2 terminal. Sand is good material for building structures on as it is good for drainage, stabilisation and can be compacted well.