A = {
    f1: function() {
        return {
            a: function(){ alert('sss'); }
        }
    }
}
A.f1().a();
Why is it used in this way?
Why is the method a() bound to A.f1()?
Member function f1 of A returns an object literal with its member a set to a function. It could've also been written as:
A = {
   f1: {
        a: function() { alert('sss'); }
    }
}
A.f1.a();
Returning an object could in this case be personal preference. There is no functional difference between these two examples.
adoes not belong to the functionf1, it belongs to the value returned by invokingf1.