The space race was a Cold War battlefield. The Atlas rocket that launched Friendship 7 was a modified ICBM (intercontinental ballistic missile) originally designed for nuclear warfare.
The Mercury astronauts were aware of the risks. John Glenn's mission was the sixth launch of the Mercury-Atlas. Of the five previous launches, two had failed.