I make my living my picking up gigs with various bands/groups/artists, I'm strictly an independent contractor... and I'm non-union. This is my constant hustle. Without a full time band, or a union to fall back on, I'm on my own... This is ideal for me, as I'm pretty good at making connections and building my gig portfolio.
Some of it is momentum: the more gigs you have and the more exposed you are, the more other groups will want you.
As other have mentioned, being a good drummer is crucial. I'd add that being a good musician is more crucial than chops or technical ability. This is the hard part for most people, as it requires critical listening and playing things that aren't necessarily in your wheelhouse. If you think of music as a conversation, then each band is going to have its own conversation styles and topics. When I'm playing a modern jazz gig, an Ellington gig, or a rockabilly gig, I'm going to be playing radically different parts. Even the function of the drummer is different in those three types of music. Also, this is where our ear training and theory knowledge comes into play: you should be able to hear variations in the form or various harmonic functions and react to add counterpoint, even if it is just a small fill or a shift in style.
Other than listening and being able to flow freely through various styles, the use of dynamics is pretty important as well. You need to be able to adjust your levels so that you can play with any group, and achieve the same dynamics as them.
Other than musically, there are soft skills. I think the number one rule is to keep it friendly but also professional. These aren't your friends (well, maybe they are...), they are an organization that is hiring you for your services. You go in, do the job that's required of you, and make and maintain business relationships while you're at it.
When you are a freelance musician, it really comes down to your ability to work with others in a variety of styles, and your ability to network and maintain those relationships.