I presuppose you don't want to know that soc was found out about because former sovietunion researchers were looking for a way to make communism work or so..

why do psych functions exist? why is the psyche structured in a way?
good question.
I suppose
a) we don't know nothing yet, but, the things jung found are interesting and seem to work afaik and
b)

if there's evolution in all other areas of life & matter, why shouldn't there (have) been evolution in terms of psychological behavior?

imo obviously, the way all "types" work together, consciously or subconsciously, is the only way our species, and to some (other, possibly/probably different) degree other species "work".

it's tha clue as to "why is everything as it is?, why are am doing as I am doing" etc etc.

for example, we might surmise, that the laws of nature (gravitation etc.) are the psychological structure of the universe