smooth scroll to anchors

Explain me please --> why is this usefull 

couldn't you simply write 'use strict' at the beginning of the file