I'm not an expert on word history, but I do know that I heard this phrase more often in the South Eastern United States where I grew up more than I hear it in the South West where I have lived for 15 years. It may be best to avoid it outside the South East unless you hear other people using it.
Many have stately that it can be replaced with "why". In many cases, I would agree. However, it needs to have more words with it sometimes.
How come my knees pop when I stand up? Why do my knees pop when I stand up?
Or the verb may need to move as in this example.
How come my check engine light is on in my car? Why is my check engine light on in my car?
I would venture to say that the phrase means more than just "why". I think it may have been shortened from a phrase such as "how did this come to pass". Just a guess though based on my experience using this phrase in the South Eastern United States. Feel free to disagree.