Workers are increasingly loyal to themselves rather than to their employers, many say. Jessica Rinaldi/The Boston Globe via Getty Images

Millennials who stay with one employer for more than a few years are a rare breed in the U.S. Yet for their grandparents, doing the exact opposite, by finding a job at a company and remaining there for decades, was always the norm.

Now, a new poll offers insight into why those tendencies have morphed so drastically between generations, by showing the gradual shift within a single age group.

In the U.S., 41 percent of baby boomers, that group born roughly between 1946 and 1964, spent at least 20 years with the same company, a new poll by the Associated Press-NORC Center for Public Affairs Research shows. Eighteen percent had spent at least 30 years with the same employer.

But even within that group, younger baby boomers tended to have shorter tenures with the same employer. Of those aged 65 and up, half had been with the same employer for at least 20 years. The proportion dropped to a third for those aged 50 to 64.

One likely cause was benefits and pension plans, the AP reported. The survey showed that of those who had stayed two decades or longer with the same employer, two-thirds had a pension. Of those who spent less than 20 years with a single employer, about a third had pension plans.

As the number of flexible — and mobile — retirement plans grows, employees may feel more able or willing to switch employers without sacrificing those benefits.

Because the survey focused on people 50 and older, it was not assessing the views of younger generations regarding job changes and loyalty to a company. But it showed how, even within a generation, structural changes in the realm of labor and employment have a discernible impact on the choices employees make when it comes to sticking with their job or seeking a better one elsewhere.

The idea of an individual being a brand, rather than being linked to a company, is one factor contributing to this growing transience. Another reason is that companies themselves are less committed to their employees, investing fewer resources in them and cutting benefits and markedly changing the nature of the relationship between employer and employee. As a result, it is inevitable that workers are increasingly loyal to themselves rather than to their employers, many have suggested.

The Associated Press-NORC Center for Public Affairs Research's poll was conducted by phone and online among 1,075 people aged 50 and above across the U.S. It had a sampling error of plus or minus 3.9 percentage points.