It's sort of like a marriage between freelancing and corporate work? Imagine you are a very specific field expert. There actual job offerings that require your specific expertise are few and far between. The kind of expertise you bring is useful in a lot of different organizations, however. You could work for yourself, but that would require an existing and broad network of people, which most people don't have. It also does not provide a stable income, or pensions, or colleagues.
So instead of doing that, you can also go work for a consultancy firm that has access to a lot of clients, knows how to negotiate a good deal and terms for working, and has the resources to help you get gigs you'd never get on your own, e.g. in a team or with organizations that they have a history with. In my case, two other colleagues have worked for this organization I'm lent out to in the past, and that greatly helps my case. You don't see much back from the higher-than-usual rates, but you do have a much more solid income & a stack of benefits and it's in everyone's interest at your job that you have enough work.
From the organization that needs the help it also makes sense. They get to have people on board for a temporary position, sometimes to fix things that are broken, without committing to a year contract and putting a lot of effort into aquisition. They can get someone for precisely the amount of hours it'll take to get something done. They don't pay anything beyond a flat rate per hour. They get more certainty that the person is vetted, because the secondment-ed person is part of a bigger organization with a track record. And they can post their temporary gig to big tender-websites, where they can easily get their position in front of a dozen potential, actually decent candidates.
The "well fuck those guys I'm jumping SHIP" does happen sometimes, but less often than you think. It's much more often the case that, if there's a good match, your temporary contract will be extended. In my case, I now have a 5-month gig, but with optional 6-month extensions if all parties agree to it.