In the post-US Civil War South, carpetbaggers were Northerners who moved to the South to take advantage of the unstable social, financial, and political climate. They were called "carpetbaggers" to imply that they were such poor, transient characters that they merely moved south carrying all their possessions in a carpet-bag. A carpet-bag, by the way, isn't a bag for carrying carpet, but a soft-sided suitcase or satchel made out of carpet.
Today, the phrase refers to someone who moves to a new location for opportunistic reasons.
Hillary is a carpet bagger.