Function in a function

can someone give me an example when you might need this? Also what is this output? it hurt my brain

func1();

function func1()
{
    func2();
    function func2()
    {
        trace(this);//[object global]
    }
}