The story
Conflation of "hiya" and "how are you doing". Evolution was probably "how are you doing" → "how're you doin'" → "how're ya doin'" → "howya doin'", at which point "howya" was replaced/confused/conflated with "hiya", resulting in "hiya doin'". Compare to the development of goodbye, howdy-do. Also, compare howzit, whatcha doin'.
Etymology from Wiktionary, CC BY-SA 4.0.