Answer
In the speech that McCarthy made, he claimed to have close personal knowledge of many Soviet spies working within the American federal government. His speech ALSO occurred within the context of the cold war, (basically communists verus capitalists, soviets vs americans it was very heated and controlled a lot of politics.)
McCarthy struck fear into the people, due to so many fearing the rise of communism and his allegations of Soviets (communist) spies infultrating the government severely alarmed and scared everyone. This slowly led to what we call the Second Red Scare, where people were falsely accused of being communist without proper evidence.
So basically, I would say his purpose was to scare people. And I come to that conclusion based on everything I have said he has done above.
Extra
Additionally, here is a summary for your reference complimentary of my AI, who did background research on the topic and made a short summary from it. It is mainly about the background of McCarthy.
McCarthy was born in 1908 near Appleton, Wisconsin. He was elected to the U.S. Senate in 1944 and served two terms. McCarthy gave his Enemies from Within Speech during the Cold War. His investigations focused on rooting out communists; he never charged a single person.
- He left the bench to enlist in the U.S. Marine Corps during World War II (1939–1945).
- After his return McCarthy decided to run for the U.S. Senate in 1944.
- He earned the distinction of being voted "the worst U.S. senator" by the Senate press corps.
- It was not until 1950, when McCarthy delivered his Enemies from Within Speech, that he skyrocketed to national attention.
- McCarthy used showmanship and number fudging to keep his name in the press, helped along by communist successes during the ongoing Cold War.
- McCarthy was elected to a second term in 1952.
(There is more, but I cut it short. if you do need more if you are doing background research on him let me know)