How are Blackjack Basic Strategy tables calculated (What is the maths behind them)

Taking your example: If the dealer up card is 6, and your two cards show a total of 14 (perhaps 8 and 6, or 9 and 4, it does not matter the combination), you should stand (take no more cards).

The basic idea is to see if your probability of winning the hand is increased by drawing over standing. If you stand, you only win if the dealer busts. You can calculate this either exactly or by simulation. If you hit, you lose if you go over 21. If you don't go over 21, you might get a higher total than the dealer. Again, you can calculate this either exactly or by simulation. The easier way is to simulate lots of hands. Note that it does matter what your 14 is-if it is two 7's, you have a higher chance of busting than if it is 8+6, 9+5, or 10+4, as there is one less card left that you can draw without busting.

I would not say the basic strategy is useless, as playing that way reduces your losing percentage substantially from two alternatives: either never bust (stop when you are at 12) or play like the dealer. It is not sufficient to get above even, but one part of a long term winning strategy will include losing as little as possible when you can't win.