It is not random and determined by an algorithm. With the same skill setup it will always be the same point.
That is exactly what they are trying to avoid here. To avoid exploiting this system to your benefit.
There are countless of discussions about this here on the forum.
And while many people dislike how it is, nobody brought up any good points in my opinion.
Regaining skill points or reallocating points is so fast, that with or without this system it doesn’t really change much anyway, but without the system the best strategy for many skills would be to determistically unspec certain keynodes for better Aoe vs. Single Target dmg.
The only thing that currently does not work anymore, but it did work previously. Is a clear indication of what skill point was removed when you open the skill spec tree of a skill that lost skill points due to changing gear.
Here are some examples of thread where this ahs been discussed before:
And finally here is a pretty old thread, that still holds true with Mike, one of the senior devs explaining the specifics of why its exploitable: