It's still "legendary" because it can do more than a creature of the same CR. The very fact that it is tougher, but the same level, makes it legendary. It'll last longer and do more than the balor.
CR is a "you should be this level to ride this ride" sign. If you're throwing a legendary 4 levels over the party, you're already off the territory where CR as the game uses it has any meaning for your group.
I disagree with this. Creatures of the same CR are roughly the same overall difficulty regardless of whether or not they are legendary. Going off of Ari's monster sorter, a dragon turtle is just as dangerous as an adult red dragon. That is what the CR building guidelines tell us. The legendary actions and resistances are included in the calculation of the creature's CR. So the extra damage and legendary resistance are integral to that creature having that CR, and if a DM does not use those, than that creature is functioning at a lower CR. An adult red dragon without its legendary resistance and actions loses about 90 effective hp and 47 DPR. It essentially becomes around a CR10 creature. So being legendary is making the adult red dragon better than a n equivalent CR10 creature not another CR17 creature.
While CR does on one hand mean that the party might not be able to deal with the creature if there level is not as high as the creature's CR, a solo creature at the same CR as the party's level leads to a medium encounter. A medium encounter at low level or high level is still just a medium encounter. While I disagree with [MENTION=6778085]Chocolategravy[/MENTION] as to low level creatures being overpowered and high level creatures being underpowered compared to the encounter building guidelines, the complaint does point out that a solo creature against a 4-person party of the same level is not going to last long. When we think of solo fights, we think that they should generally last a while. If a DM wants a longer solo fight with the least risk to a party, they need to bump the CR by increasing the creature's effective hp (either through traits or actual hp). The CR bump needs to be enough to make the fight at least a hard encounter. By bumping the CR through hp, there is a reduced risk that the harder creature wipes someone out in one turn.