In politics allegiance is when a person or group gives their loyalty unconditionally.

People who give their allegiance may do so selflessly because they believe in the ideals of the group or have great trust in the individual they choose to follow.

People will give their allegiance selfishly in order to "ride the coat-tails" of a pwerful person to gain patronage - wealth or positions that they could not achieve otherwise.

In power politics, weaker individuals will almost always declare allegiance, or risk being coerced to do so in any case. Stonger individuals or groups may declare alliance - the difference being that partners in an alliance get something in return for keeping the alliance.