Where does extra outside scholarship money go that isn't used in cost of attendance?

Some colleges have limited stacking, where merit scholarships will replace loans and work study first before replacing grants. For example:

https://financialaid.stanford.edu/aid/outside/
https://students.ucsd.edu/finances/financial-aid/types/scholarships/

So in the quoted example, if the college with a $50,000 COA offered a $30,000 institutional grant and $8,000 of federal direct loans and work study, a $20,000 outside scholarship would replace the $8,000 of federal direct loans and work study and $12,000 of institutional grant, giving you a net gain of $8,000, or reduction of net price by $8,000.