According to the Piano History Centre, all stringed instruments need thicker strings for the lower notes, this is not peculiar to guitar, it is necessary to increase the mass in order to produce a lower frequency.
Different styles of music require different sounds and/or ranges;
A 4 string bass is typically tuned to E A D G
A 5 string bass is tuned to B E A D G
A 6 string bass is tuned to B E A D G C
many heavy metal bands use 5 string basses to avoid drop tunings and so they can still keep the range of their instrument, although some bassists use drop tuned 4 string basses.
some Jazz musicans use 6 string basses because the high C string enables them to play solo in the range that a guitar can
According to the Piano History Centre, all stringed instruments need thicker strings for the lower notes, this is not peculiar to guitar, it is necessary to increase the mass in order to produce a lower frequency.
The frequency at which a string vibrates is a formula that depends on the mass of the string and the tension on the string. If you used the same size wire for all 6 strings, you would have more tension on the treble side, and less on the bass side causing the neck of the guitar to warp. To keep the neck of the guitar from warping, all of the strings should have about the same tension on them, so different sizes of wire are used for each string.
a bass has a longer neck