It's a standard (practice) mim. thread length - For us, it's 1.5
Also depend on the material as you can have less # of threads on steel comparing to aluminum to avoid the thread is stripped out under certain load
It is a basic rule of thumb to determine the depth of the threads that will provide the correct holding strength of the threads.
As Christian Chu stated, it will also depend on the material.
If you don't have a deep enough thread the threads can strip out if over-tightened, If you use more than this then the added strength is not significant and if too long the tap used might not be long enough.
There are always exceptions - that is why you can change the distance, but this will work in most cases.