The pattern of using IIFE (Immediately Invoked Function Expression) in three.js source code is quite common. Interestingly, removing the IIFE doesn't seem to have any impact on the functionality. It appears that using a named function instead of an anonymous one is preferred by developers.
https://github.com/mrdoob/three.js/blob/master/src/core/Object3D.js
Object.assign( THREE.Object3D.prototype, ..., {
...
rotateX : function () {
var v1 = new THREE.Vector3( 1, 0, 0 );
return function rotateX( angle ) {
return this.rotateOnAxis( v1, angle );
};
}(),
...
})