It is based on the accumulation of skills a player has. It also depends on which position the player is at, according to the salary formula.
For example, a player classified as a point guard will have more cap space taken up by a PA or HA pop, in comparison to a small forward.
Any PF or C with high rebounding have a chunk of his cap space taken up by it, in comparison to other big man skills, such as shot blocking.