My understanding of the conflict is that the Argentine junta was flailing and turned to the Falkland Islands for an upsurge of nationalist support, anticipating that the 8,000 miles between the islands and their sovereign would be enough to prevent the British mounting any serious defence of the islands.
But when it became apparent the British would be sending a task force to engage them, why did the Argentinians not withdraw. My understanding is that they were reasonably badly equipped and despite outnumbering the British, their landing force was mainly poorly trained conscripts. Were they genuinely under the illusion that the British could be defeated?
Part of the reason was that they didn’t believe that the UK thought it was worth fighting over. Despite the various negotiations over the transfer of the islands not having gotten very far, they were still happening, indicating that London wasn’t going to make ownership a line in the sand. Further, they had publicly announced the withdrawal and retirement, without replacement, of the Royal Navy’s only ship in the area, the Ice Patrol Ship HMS Endurance. So obviously, they didn’t think it was worth fighting over if they were removing military assets from a disputed area. Any movement of warships of the task force could be viewed as simply a political bluff.
Secondly, they may simply have believed they could win. They would not have been alone. Quoting from Woodward’s book:
It should also be recalled that there were several entirely competent organizations which initially suspected the whole operation was doomed. In no particular order they were: a) The United States Navy, which considered the re-capture of the Falkland Islands to be a Military impossibility. b) The Ministry of Defense in Whitehall, which generally regarded the whole idea as far, far too risky. c) The Army, which considered it to be ill-advised, for lack of a ‘proper’ advantage ratio in land force numbers. d) The Royal Air Force, which, seeing little role for themselves on account of the vast distances, and no chance of a Navy surviving in the face of an Air Force, was inclined to agree. e) The Secretary of State for Defense, Mr (now Sir) John Nott, since success in it would probably overturn the 1981 Defense Review.
This latter doesn’t strike me as an argument, but anyway. Suffice to say, the Argentinians has good reason to believe that the British would not fight, and that they could beat the British even if they did.
It's easy after the fact to view the Falkland Islands War as a hugely imbalanced conflict between a military near superpower and an upstart, the reality is that the war was a close run thing and the outcome was far from certain.
For one you have to understand that the Falkland Islands are significantly remote for any country that is not Argentina or Chile. Very few nations had the ability to effectively project power to the Falklands and the UK was not one of them. The UK didn't have multiple CATOBAR aircraft carrier groups the way the US did, they couldn't simply park an entire airforce anywhere in the world. Instead they had a few essentially escort class carriers. The Harrier is a capable aircraft but it is not fully the equal of other aircraft of its generation, it has a lot of limitations.
Additionally, the UK lacked the ability to hit the Falklands or Argentina with bombing raids. They created the ability essentially out of whole cloth. It took flying 13 aircraft in a complex staged refueling process to get merely 2 bombers to the Falklands (and back) from Ascension Island. In total they achieved only 5 bombing runs achieving only very modest damage to targets. The most important damage was a crater in the main airfield of the island, which was in any event repaired within a single day. The main result of the Black Buck raids was demonstrative rather than effective, it showed the Argentines that the UK had the ability to perform bombing campaigns in the area, which caused them to keep the bulk of their airforce stationed close to Buenos Aires for defense. However, that effect was substantially undercut by UK statements that they would not undertake raids on Argentina itself.
The UK's position in the conflict was considerably tenuous up until near the very end. Had a single Argentine pilot gotten lucky with an Exocet missile attack on a British carrier or troop transport that might have changed the outcome. As it was, the British lost 7 vessels during the conflict including 2 frigates and 2 destroyers.
The advantage of the British in terms of the quality of training and quality of equipment especially in the battle in the air and on land became evident later in the war but on paper the Argentines had a significant numerical advantage with competitive capabilities (some of which proved to be as effective in actual combat as imagined, such as the Exocet anti-ship missiles). There are many points in the conflict where one could imagine that slightly different decisions could have been made which would have dramatically changed the balance in the war. If the Argentines had gone all out in an attempt to sink the British task force that alone might have turned the tide, for example.
Few people expected the British to put forward such a robust effort to hold onto an essentially useless piece of land merely for the principle of the matter. Even so, with the British basically putting forth a maximum effort the conflict could have turned either way very easily.
The Argentinians received mixed messages from the US in the run up to the war. Jeane Kirkpatrick, the then US Ambassador to the UN supported the Argentinians. She had been a foreign policy adviser on the Reagan campaign team and was known for the "Kirkpatrick Doctrine", which advocated supporting authoritarian regimes around the world if they went along with Washington's aims. She believed that they could be led into democracy by example. She wrote, "traditional authoritarian governments are less repressive than revolutionary autocracies." Kirkpatrick believed the western European democracies were weak on Communism and argued in favour of US neutrality in the conflict. The night before the Argentinians landed, Kirkpatrick had dinner with the Argentinian diplomats in New York which was interpreted by the Argentinians as a green light. They received different messages from the State Department but the Generals chose to believe what suited them.
Kirkpatrick lost out in arguments inside the US government because the US was dependant on UK for the defence of the Continental Untied States. US/UK SSNs in effect operated as a single fleet intercepting Soviet submarines leaving their bases in the Murmansk region. These included Soviet SSBNs carrying strategic nuclear weapons aimed at the US. If the British withdrew their subs the threat to the US would increase and the US would take years to build replacements. The US fully committed to supporting the UK was not in the Argentinians calculations.
The despite the UK getting US support the Argentinians still thought they could win. However they underestimated British ingenuity and the effects of US support. The UK launched air attacks on the Air filed at Port Stanley from its base on Ascension Island. This was well beyond the range on any UK aircraft even when air to air refuelled. Operation Black buck involved designing and fitting air to air refuelling probes on the Hercules, Nimrod MRA2 within a matter of weeks. The missions involved multiple air to air refuelling not just of the Vulcan bomber but the Victor tankers as well. At the time the 7800 mile attack was the longest raid in history. The 7 raids convinced the Argentinians that Port Stanley was not safe for its jets.
The US supplied the UK with the first versions of the all aspect Sidewinder missile. This allowed the RN Sea Harries engage Argentinian aircraft head on rather than to have to manoeuvre to the rear of the target before getting a lock on. This proved decisive in the air war.
In summary. The Argentinians miscalculated by listening to part of the US government that was telling them what they wanted to hear and not understanding that the US/UK military relationship went far deeper than just NATO commitments
The Argentinians underestimated the ability of the British rapidly build capability and carry out attacks
The Argentinians made no allowances for the appearance of new weapons systems.