That's not random. Either the shot connects or it doesn't, because you landed it or you didn't. It's not random; there's not a chance you'll land the skillshot if you don't aim it properly, or predict the target's movements.
And yes, you can absolutely guarantee you can hit your skillshots, by using CC, the terrain, and game knowledge to your advantage. If someone is fleeing from someone between a wall and a tower, they cannot sidestep your shot. If you know the width of your skillshot and the target's distance to terrain, you can gauge whether or not they have time to actually walk out of it's effect. If you know someone's burned their Flash in an earlier engagement, you know they can't use Flash to avoid a perfectly aimed shot. If someone is about to get caught/is caught in CC, then you can line up your shot for an absolute hit.
There's even a strategy where you wait for your target to execute their AA to last hit a minion, so you can launch the shot while they're stuck in the attack animation. If the enemy knows this, you've given them an ultimatum; take the damage from the shot, or lose the minion.
Moreover, skillshots are used for more than just hitting enemy champions. You can use them to steal Baron or Dragon, check bushes for enemies, and clear linear minion waves.