It makes sense, really. Both Andrew and Harry have been reported as the Queen's favourites, which in itself can lead to some messiness of entitlement.
I think the concept has always been that the heir to the throne should learn to be responsible, learn proper decorum, and generally be prepared to be the ceremonial head of state.
The next down the chain has the benefit of freedom - they have all the privilege, money, and opportunities, but are held to a lower standard of behaviour, and their excesses are excused. Instead of keeping their worst behaviours hidden (as the heir is expected to generally manage) they can be a little wilder in the public eye.
Unfortunately, that freedom is hard to see as yet another privilege when your intellect is set by generations of inbreeding, and when you've got neither the empathy nor the experience to recognise how much better you have it than almost everyone else.
It seems like the monarchs often have more difficulty connecting with the heir than the spare.
Heirs are essentially waiting for them to die, so then they can inherit the throne. The monarch is acutely aware of this, having done the same with their own parent. That must hit them. The heir grows relatively more independent as a result, and the press officers are far more interested in grooming them into a polished product so they tend to be more suited to the role.
Spares are sympathetic characters to the monarch, and as well they're a child who is
not waiting for them to die so there isn't that same cloud over their relationship. They're indulged, leaving them immature and childish, and this continues as long as that monarch lives. They resent the heir, because the public perception of them isn't in line with the favouritism they get within the RF. Once their sibling ascends the throne, that means the parent is dead, and the sibling likely has children by this point making them utterly irrelevant as they're below their nieces and nephews in line. They aren't allowed to get paying jobs while working as a royal, and are then dependent on how much their sibling is willing to give them as their part of the soverign grant, and they're unlikely to be happy no matter what that figure is.
Queen Victoria wrote that one of her spares, Arthur, was “dear, dearer than any of the others put together". She had a horrendous relationship with Edward who'd go on to be king.
King George V was particularly harsh towards Edward, his heir. He was less harsh to George VI, who was his spare.
King George VI actually flat out called QE his pride, but Margaret his joy.
And then Andrew, and now Harry. They need to ensure Charlotte and Louis don't go the same way - whether that's telling them early on not to expect to be sustained as working as a royal for life and allowing them half in half out so they can earn their own money, or simply not having spares from this point on.