The first thing of any significance that the Swiss Family Robinson does when they get to shore is to get down on their knees and give thanks to God for allowing them to escape from the wreck of the ship.
This is a very typical thing in this novel. The whole book is meant in part to be a moral example to people. There is talk of religion and morals throughout the whole book. The family quite often kneels in prayer and otherwise acknowledges God. So it is not surprising that this is the first thing they do.