The clearance in St. Thomas is actually for immigration purposes only. Since the Virgin Islands are a U.S. territory, the CBP (Customs and Border Protection) officers on board will only verify your citizenship status (passport inspection). You will still be required to submit your customs declaration and go through customs "baggage clearance" when you return to your port of origin in the United States.
By the way, the CBP authorities have an office in a trailer at the cruise ship pier in Havenside. At least they did when I was last in St. Thomas two years ago. They are available to answer any questions passengers might have about customs restrictions, baggage declarations, personal allowances, etc. when you return to the U.S. You might also ask them if they can give you a copy of Know Before You Go, the CBP traveler's handbook.