Paste the above script into a query window and see the results. The first time I saw this, I expected to see only the last row's data in the variables.
The best use I've found for this behavior is select the values out of syscolumns into a single string that I can easily paste into a select statement.