Forwarding the issue to QA team for further investigation. Thank you for the detailed information!
I have tested it more using cheats on new campaign in beta e1.7.1.
Once an in-game day - somewhere in the middle of every morning - the update allocating perks and points hits. If you hire a companion before the first such update in their life, they will have unspent points and perks ready to pick.
I think this bug/exploit was poorly/partially fixed some time ago - it has been fixed only for starting companions to be specific.
It seems like in beta e1.7.1 (and probably also in few last versions of the game), new campaign starts right before the first perks/points allocation update hits, so even if you use cheats and teleport as close as possible to a town, you won't be able to enter it and hire companions before the first update and this bug/exploit won't occur. I remeber it was possible few game versions ago, but not anymore. However, this exploit is still possible for companions who spawn later in the campaign.
Besides fixing this issue, companions need some rebalance in my opinion. It is hard to create some useful character build for any companion available in game. They should have much lower starting levels or they should have points partially spent and partially waiting ready to be spent by the player.
Fixing this exploit without a rebalance would bring more bad than good to the game, because this exploit makes possible to have decent companions. If someone doesn't like it, they can easly "fix" it by hiring companion one in-game later, or by hiring them right away and enabling "Auto Allocate Clan Member Points" option for one in-game day.