Why do some people get panic disorder and others don't?

Specifics unknown. Panic attacks are abrupt bursts of psychological and physical discomfort such as racing heart, sweaty palms, shortness of breath, trembling, a sense of impending doom or death, and other similarly discomfiting signs and symptoms. There is a genetic component, and, in people susceptible to it, certain drugs can precipitate it. That said, we don't really know why it happens. But, it is treatable.
Who gets panic. This has many causes. The first consideration is the possibility that anxiety is due to a known or unrecognized medical condition. Environmental factors such as early childhood trauma can also contribute to risk for later anxiety disorders. Certain can often trigger like repeat stress, trauma and even certain changes in temperature giving the brain wrong signals of danger when there is none.