The answer to this question is complicated by the fact that there were numerous forces involved in the so called 'ratlines' that allowed former Nazis to flee prosecution or revenge in Europe. The primary forces involved were the Catholic Church and the governments of various countries including Spain, the US and Argentina.
The ratlines, that is the escape routes used by fascists in the aftermath of World War II, have their origins in the diplomatic pathways and agreements set up primarily by various agents of the Vatican including Maglione, Hudal and Caggiano. These escape routes essentially allowed Nazis to seek refuge in either Spain or the Vatican, gain false documentation and then move on to South America, primarily Argentina (but also Paraguay, Ecuador and numerous others). Aarons and Loftus (in Unholy Trinity) provide details of how the Catholic Church actively sought out governments that would be interested in providing refuge to those people in Europe whose views had become unacceptable to the public due to the outcome of the war. Much of this was due to the Church's vehemently anticommunist stand, with many former Nazis being seen as valuable allies against the Eastern Bloc (P. Lyon, History of the Ratline). Catholic Action, an organisation devoted to helping the Church influence societal values and norms was revived by Pope Pius XII for this very purpose. Pius was subsequently accused of helping, or at least turning a blind eye to, the vast number of Catholic officials involved in seeking asylum for Nazis.
Beyond this, many world governments granted refuge to former Nazis, including the US through the infamous Operation Paperclip. However, Argentina is certainly the most famous of these due to the sheer number and prominence of the Nazi officials who made their way there. Unfortunately, there is nowhere (that I know of) where there is a convenient record of Juan Peron's exact reasons for encouraging Nazi migration, however several historians have made well-supported guesses. First, much like the US, many countries simply didn't want the USSR to gain access to these Nazis, whether for humanitarian or practical reasons. Martinez, fairly convincingly, claims that Peron was most likely hoping to gain access to advanced technology or knowledge thereof that Nazi scientists were known to have developed throughout the war (La Novela de Peron). Similar programs emerged in other countries, but Argentina was the most explicit in advertising themselves as a potential Nazi safe haven.
Through this combination of factors, former Nazis were able to flee throughout much of the world under assumed names, new identities and false documents, often provided by the Catholic Church's humanitarian services for refugees. Argentina was simply the place where a sympathetic government and strong connection to the established Catholic ratline structures coincided.
Follow up question: Why did Brazil do the same for the Japanese?
A corollary question. Why did both the Jews and Nazis go to Argentina to escape the aftermath?
Follow up: Were there any tangible/perceivable gains from these actions?