It is more than a bit revealing that the modern conservative and libertarian shows nearly complete loathing for the part of the Constitution labeled as the Preamble but they have no problem elevating the personal writings and observations of individuals to the level of scared text well above the Preamble.The very first thing the Preamble says is "We the People of the United States" which means the people were already a united states before the constitution was written. How were they were united? By the AoC of course. The Preamble was meant to show the intention of the existing "United States" to form a stronger national government in order to make a more perfect union. The union under the AoC was less than perfect because the central government was weak and so the Constitution was ordained by the people to form a stronger one with more permanency.
But you're right the courts don't use the Preamble to base their rulings on, but they do however look to it to help them find the framers "intentions", just as they look to the Federalist Papers, the AoC, the Declaration of Independence, letters and essays written by the founding fathers before and after the signing of the Constitution and more.