Installing a exterior light in existing vinyl siding
You said:


  So in that case I really don't understand how this method would prevent moisture, which may have already gotten behind the vinyl, from getting into the electrical box.


You are correct in your assessment, the siding is not waterproof or even moisture proof. Water will get behind the siding, hence the reason for underlayment or house wrap. Electrical boxes cut into siding will not be waterproof or moisture proof either.

The code just requires you to use a weather resistant / tamper resistant receptacle and an in use cover if it will be exposed to the weather. If it is under a porch or patio you can use a old style spring cover like a Bell box cover.

The terminals and connections in this box will probably corrode and need replacing before anything inside the house but should last for 10 years or so depending on your location and the weather.

If you want it as water/moisture proof as possible then install an all plastic solid device box with PVC nipple attached with a PVC connector to a junction box inside of the house. Then wire it with THHN/THWN wire instead of NM cable. Then use an in-use cover with a gasket and the aforementioned weather resistant / tamper resistant receptacle. That should keep the inside of the box pretty dry.

Good Luck!

Happy Thursday!