In my experience on US airlines, the distinction is whether you are on a regional or mainline flight. On regional flights, you usually get your gate-checked bag back at the gate at your connecting airport; on mainline flights, it is usually checked to your final destination.
Mainline flights are the typical flights most people think of: you are on a Boeing or Airbus jet with 90-100 or more seats and 5 or more seats per row, and the plane says "United", "American", etc on it. These flights are actually operated by the main airline (e.g. United).
Regional flights are on smaller planes, a jet or turboprop with fewer than 90-100 seats (common manufacturers are Bombardier and Embraer), and usually 2-4 seats per row. The plane says "United Express", "American Eagle", etc. These flights are not actually operated by the main airline (e.g. United) but by smaller independent "regional" airlines (e.g. CommutAir, SkyWest, ExpressJet, etc) that contract with the main airline, who sells the tickets. See this Wikipedia article for more on these arrangements.
My experience has been as follows:
On regional flights, the overhead bins on the planes are typically too small to hold a "standard" carry-on bag. Thus, gate checking of carry-on bags is the norm. The gates are set up to make it easy for the workers to collect and return your bags right at the gate. (It helps that the planes, and hence the jetways, are smaller and closer to the ground, so it is easier to get a bag from the plane to the jetway. In some cases you may even disembark directly onto the tarmac, via stairs, and be handed your bag by the worker who just pulled it out of the plane's cargo compartment.)
So it is usually on regional flights that your gate-checked bag is returned at the gate at the end of the current leg.
On mainline flights, the bins typically are large enough for standard carry-ons. Gate checking is only necessary if the flight is really full, or a higher-than-average number of people have full-size carry-ons, or if someone has an unusually large bag (probably over the official size limit) that does not fit in the bin at all. (If the flight is known to be full, they often ask for volunteers to gate-check their bags, and only do it involuntarily as a last resort.) As such, since gate checking is the exception, gates for mainline flights are not set up to make it easy to return your bag right at the gate. So the only reasonable place for you to get your bag is at the baggage claim carousel. It would not make sense to send your bag to the carousel at your connection airport (you would have to leave security to claim and recheck it), so they tag it to your final destination and transfer it to your connecting flight just like any other checked bag.
So it is usually on mainline flights that gate-checked bags go straight to your final destination. On the other hand, on these flights it is relatively uncommon for bags to be gate-checked at all, and even rarer that you would have to gate-check your bag if you didn't want to.