It's purely luck, granted by the random number generators. Granted some variables are included. It's all up to the user, whether they just mindlessly cube, or if they create some superstitious pattern that they believe increases luck. I am a superstitious person, so there are quite a few things I do that I feel benefit me.
As you cube more/watch more cubing videos/learn prices, you gain the experience to determine
1. Whether something is worth cubing at all
2. Whether you should settle for a potential or keep going
3. How much NX is needed for your safety margin
4. What your expected results are, and whether those results will meet your expectations
A lot of people waste their NX/mesos on foolish cubing runs/mediocre upgrades. Last Miracle Time, one of my guildmates cubed a 33% int SW tattoo...already equipped to his warrior. That was a 100k+ NX loss because of bad decision making. Other people cube rare equips, roll over 30% stat lines or 21% att bonus, don't select the "after" tiered potential with blacks, try to cube armors before weapons, cube legendary tier gear with blacks, among various other mistakes.
You should be making profit when you cube. If you aren't, you're either doing something wrong, or rich enough to not care.
@axnslicer Not a bad post indeed! However, I think there is one thing your forgetting. "Choice". you explained that partially in your last sentence, I just wish it were explained more. I used to be just like you as well, only, from experience, I upgrade to improve myself further to help people. Thats all.