Giant bettas have been selectively bred just through the use of larger fish until spawns produced consistently larger fish. This took many years, there are articles about it online. King bettas are mostly a marketing term created by petco. Oftentimes they are not true giants (3+ inches), but there isn't a large splenden they're mixing with some other type of betta to create a king. Oftentimes petco king bettas have "wild" coloring - black, blue, green, and/or red.
Domestic bettas were selectively bred to fight and for coloring/looking pretty from wild bettas, of which there are several species. Giant bettas have been bred from those already modified breeds. However, characteristics of the wild betta can still show up in regular bettas and giants alike, such as a longer, more tube like body, and "wild" coloring, explained above. I hope this information is helpful!
~Ask me about discounts on beautiful aquabid fish! ~