How did the South Vietnamese Army (ARVN) do so well in the Battle of An Loc in 1972 and yet disintegrate in the face of future offensives?
The Army of South Vietnam (ARVN) did OK in the Battle of An Loc, which was the central battle in the Easter Offensive of 1972, but I don't know if I would say they did "well". The Battle of An Loc was part of the aftermath of the Battle of Loc Ninh, which was a disaster for the ARVN, and truly showed their weaknesses.
At An Loc, Three Vietcong and North Vietnamese Army (NVA) divisions attacked the ARVN 5th Division, which was alone in guarding the main highway to Saigon. By this point in the war, most American ground troops had been withdrawn and operations severely limited. Most of the American power remaining were Air Force bombers and strike fighters, which would prove crucial.
What the ARVN did well was to hold at An Loc and essentially blunt the advance of the NVA until American air power could strike decisively. They also had a great deal of American advisers with them to help direct and coordinate the defense. Knowing they had air supremacy and American help, the ARVN performed more admirably than it would do three years later, in the final offensive that ended the war.
American B-52s were the most effective force during this battle, and the North Vietnamese also learned that any offensive against the South had to have secure logistical support in order to succeed.
I just want to emphasize one thing that Brett is alluding to but not stating as forcefully as he might. ARVN won at An Loc because of US help and it fell apart later in the war because that US help was withdrawn.
At An Loc, ARVN was strongly supported by US air power as Brett says. But the US pulled all of its personnel out of South Vietnam by the spring of 1973. This meant that when the NVA launched major offensives after that, ARVN had no US air support.
In addition, the US had even started to cut financial support to South Vietnam by the end of 1974. This hurt ARVN in many ways, the most important of which was the fact that it lowered morale. Without US funding, ARVN was not able get its soldiers the supplies they needed and was even unable to pay them at times. There are stories of South Vietnamese pilots refusing to fly missions unless bribed.
By 1975, then, ARVN lacked US support both military and financial. This left it much weaker than it had been when it was able to "win" at An Loc in the spring of 1972.