There are certain APIs that they need to utilize in part of the code, which requires the permission to be granted. It may not be necessary for that API to be used, which is why apps still function if they lack permissions. They use alternative means or do not do anything because of that.
Identity, Contacts, SMS, Phone, Photo/Media/Files, Storage, Camera, Microphone, Wi-Fi. All of these are pretty much essential for running the basics of SMS messaging with few exceptions. Contacts helps for sender/receiver identity. P/M/F, Storage, Camera, Microphone are used for sending media, files, or taking media to send. SMS and Phone for the actual transmission of SMS. Wi-Fi is probably used to help identify if the phone is Wi-Fi connected or not for transmitting messages.
Calendar: This is probably used to help with setting calendar events when messages containing date information are received.
Location: As far as I know, messages are sent with location data unless not given the permission to access that information.
As for some of the other permissions, they appear to be things that help with how they send data across. The rest seem to be tidbits that help you do things faster or provide an alternative way to do something, like set wallpaper.
If you have a more specific permission you are worried about, I will do my best to add information about what it might be doing with it.