Why do we have fixed output length in the algorithm SHA1 Why do we have fixed output length in the algorithm SHA1 . is there any explanation about that
SHA-1 is derived from MD4 and MD5, which are Merkle–Damgård type hash functions with a compression function based on a block cipher.

The initial values to an MD type hash function are essentially the plaintext to the block cipher, with the input to the hash function becoming the key. The maximum length of the hash is determined by the amount of bits of initial value, which is the same size as the block width of the cipher. A block width of five 32-bit words gives SHA-1 a state size and maximum output of 160 bits.

For SHA-1, there is no truncation of the block cipher state prior to output, so we have 160-bits in, and 160-bits out. This provided the required collision resistance of 80-bits as required by the lifespan estimate of how long the hash function was to be in service, which as of about 5 years ago was bumped to 112-bits.

If they so desired, a variable length output could have been implemented like they did with SHA-512/t, but since the maximum output length was the minimum security required, that was neither necessary nor wanted.