I wonder why pyrrhus is considered such a good general. Hannibal Barca said he was the second best after alexander but he never won a war. I heard he was a bad strategist but a good tactican. But he lost a lot of battles and the ones he won, he barley left with his army intact which is where the word pyrrhic victory is from. So my question is why do people consider him a good commander when all he pretty much did was lose with a few hard fought victories (if you can call them victories).
Of the Pyrrhic War battles we have vaguely reliable details of (Heraclea and Asculum, Pyrrhus's two classic Pyrrhic victories), it appears that Pyrrhus fought numerically stronger Roman forces, and won, inflicting perhaps 50% or more greater casualties on the Romans. That doesn't point to him being a bad commander. We don't have enough details about the battles to know if he commanded particularly well.
Repeatedly beating larger Roman armies on their home ground is a reasonable achievement. While his victories were the crushing defeats inflicted on Rome by Hannibal, they were still victories. It is hardly Pyrrhus's fault that Rome could replace the losses and maintain powerful armies in the field (and the defences of Rome were too strong for Pyrrhus to take Rome). lack of support from his local allies might have been his fault, as reported by Appian:
After a shipwreck, Pyrrhus, king of Epirus, arrived at the harbor of Tarentum. The Tarentines were very much put out with the king's officers, who quartered themselves upon the citizens by force, and openly abused their wives and children. Afterwards Pyrrhus put an end to their revels and other social gatherings and amusements as incompatible with a state of war, and ordered the citizens to severe military exercise, under penalty of death if they disobeyed. Then the Tarentines, tired out by these most unusual exercises and orders, fled the city as though it were a foreign government and took refuge in the fields. Then the king closed the gates and placed guards over them. In this way the Tarentines gained a clear perception of their own folly.
It does seem reasonable to expect Tarentum to make a major contribution to the way, since it was their war, and they had invited Pyrrhus to be their ally and leader in the war. Perhaps this failure to secure the full support of the Tarentines is more a failure of diplomacy than generalship (and poor skill and/or luck at diplomacy appears to have often feature in the career of Pyrrhus).
His fame as a great commander is reported by Plutarch, writing more than 3 centuries after Pyrrhus's death. His fame rested on two things, as described by Plutarch. First, his courage and skill in combat was admired, and drew comparison with Alexander:
This fight did not so much exasperate the Macedonians with anger for their loss, or with hatred to Pyrrhus, as it caused esteem and admiration of his valour, and great discourse of him among those that saw what he did, and were engaged against him in the action. They thought his countenance, his swiftness, and his motions expressed those of the great Alexander, and that they beheld here an image and resemblance of his rapidity and strength in fight; other kings merely by their purple and their guards, by the formal bending of their necks and lofty tone of their speech, Pyrrhus only by arms and in action, represented Alexander.
This might qualify him as a great soldier, but is not a basis for calling him a great general - it says nothing of his tactical or strategic skill (but quick and dynamic decision-making can be an important element of command ability).
According to Plutarch, his fame as a tactician and general is based on his writings:
Of his knowledge of military tactics and the art of a general, and his great ability that way, we have the best information from the commentaries he left behind him. ... In a word, he seemed ever to make this all his thought and philosophy, as the most kingly part of learning: other curiosities he held in no account.
As far as we know, his writings haven't survived, so we can't judge for ourselves whether they should merit this praise.
Further reading:
Plutarch on Pyrrhus: http://classics.mit.edu/Plutarch/pyrrhus.html
Appian on Pyrrhus in Tarentum: https://www.livius.org/sources/content/appian/appian-samnite-wars-2/