This is a module expansion template .
The returned object contains references to functions defined inside IIFE. Thus, functions defined internally are private to an anonymous function.
But if you want to use internal functions outside, you can use the returned object.
The value of Test will be
var Test = { func1: func1, func2: func2, func3: func3 };
And you can call func1 from outside as
Test.func1();
This is how Javascript emulates a class . Since there are no visibility qualifiers using the module template, variables / methods can be public / private.

The sample module template is inspired by the module template. When displaying a module template in an object, only a reference to private variables / methods is returned.
The main idea of ββthe template is to avoid evil global variables. This is similar to IIFE, except that instead of a function, an object is returned. Variables / methods defined inside IIFE are private to the function. To access any variable / method inside IIFE, it must be added to the returned object, and then it can be accessed from outside IIFE. This template takes advantage of closures, so variables / methods defined inside IIFE are available even after the object returns.
From the book Addy Osmani Exploring Javascript Design Patterns
The drop-down module scheme arose because Heilmann was upset by the fact that he had to repeat the name of the main object when we wanted to call one public method from another or gain access to public variables. He also did not like the requirements for module templates in order to switch to object literature for what he wanted to make public.
The result of his efforts was an updated template in which we would simply define all our functions and variables in a private area and return an anonymous object with pointers to private functionality that we wanted to disclose as public.
<strong> Benefits:
- Sealing. The code inside IIFE is encapsulated from the outside world
- Clean, organized and reusable code
- Confidentiality. This allows you to create private variables / methods. Private variables / methods cannot be affected due to IIFE limits.
Disadvantages:
- If a private function refers to a public function, this public function cannot be redefined
Further reading:
EDIT
From comment by @Mike
It should be noted that it is common for creating an object (for example, var me = {}; ), and then declares public members on it ( me.func1 = function() { /* ... */ }; ), returning this object to end ( return me; ). This avoids the repetition that we see in the return statement of the OP code (where all public things are repeated).