It's for On-The-Go, to select which device is the host or slave:
The OTG cable has a micro-A plug on one side, and a micro-B plug on the other (it cannot have two plugs of the same type). OTG adds a fifth pin to the standard USB connector, called the ID-pin; the micro-A plug has the ID pin grounded, while the ID in the micro-B plug is floating. The device that has a micro-A plugged in becomes an OTG A-device, and the one that has micro-B plugged becomes a B-device. The type of the plug inserted is detected by the state of the pin ID .

Pinout diagram for usb type-b out of 5 pin header
5 pin to USB-A... What is the fifth wire?
Does anyone know what the USB pinout for Virpil's 5-pin connectors are?
Help with 5 wire USB color code.
What Is a USB Pinout?
How many pins are in a USB-C connector?
Are all USB pinouts the same?
Videos
It's for On-The-Go, to select which device is the host or slave:
The OTG cable has a micro-A plug on one side, and a micro-B plug on the other (it cannot have two plugs of the same type). OTG adds a fifth pin to the standard USB connector, called the ID-pin; the micro-A plug has the ID pin grounded, while the ID in the micro-B plug is floating. The device that has a micro-A plugged in becomes an OTG A-device, and the one that has micro-B plugged becomes a B-device. The type of the plug inserted is detected by the state of the pin ID .

To complete Oli Glaser's answer, 5 pins USB respects the On-The-Go standard (OTG). The additional pin added to the conventional USB port is the ID pin added to the 4th electrical pin, and allow to recognize the device. Here is the resulting electrical setup of the pins:
- VDD (+5V)
- D- (Data-)
- D+ (Data+)
- ID (ID)
- GND (Ground)
As compared to other 4-pins USB devices, where there is no ID pin, the advantage is to be able to distinguish the host device from slave devices.
- Host: ID connected to GND
- Slave: ID not connected (floating)

Does anybody have a pinout diagram for a 5 pin usb type-b header? I looked online and couldnโt find one. This is for a usb microphone (Blue Snowball) by the way.
As mentioned in the subject - most sticks I have opened up or bought parts for has a USB to 4 pin connector. Even most cables I've cut open only had 4 wires. I recently got a gift of an PS3 Madcatz TE from a friend and I'm trying to mod it and realized it had a 5 pin connector on its usb cable. That's when I realized the board I am trying to replace it with also had 5 connection points... So what is the difference? What does the extra wire do?