A husband pillow is called that because it's designed to offer supportive comfort, much like a husband might when someone is sitting up in bed. The pillow's arms wrap around the user, providing back and neck support in a similar way to a supportive embrace.
Essentially, the name reflects the pillow's function of providing a sense of comfort, security, and support while relaxing.