The XLR-style connector was developed by the Cannon Company, based on the need for three-conductor balanced cable. The balanced design is noted for its capability to cancel noise induced along its length. This makes it ideal for use with low-impedance microphones requiring long cable runs to mixers. In 1975, the XLR was recognized as a standard for use with microphones, and today it remains the most common method to connect mics.
Given the robust design of XLR connectors, use with speakers is also logical. When you consider that XLR specifications include a locking mechanism, it becomes an attractive alternative to 1/4-inch phone plug connectors, which lack the capability to lock and can be disconnected accidentally. Also, phone plugs could short out when being connected, which made them unsuitable for use while high-powered amplifiers were in use.
Mic cable uses a wire sheath around the two inner conductors. This sheath improves noise performance in long-run cables. Speakers don't require noise reduction, given the signal they carry is much greater than that from a microphone. It may require heavier gauge wire than that for microphones. Narrow gauge wire, if shielded, can be used with microphones, but when used between amps and speakers it may not work well, and may indeed be unsafe. SpeakON connectors are becoming common as an alternative dedicated speaker wiring standard.
Speakers with matched power amps built-in are far more common these days. Many mixers use XLR connectors for their main output to the amplifier stage. Mic cable gauges are acceptable for this as the signal from the mixer is line level and unamplified. It would appear in this application that an XLR cable is being used as a speaker cable, but in fact it is supplying an amplifier. The amp-to-speaker connection is internal and of short run. In the case of supplying active speakers, there is no difference at all between XLR cables for microphones and speakers.