Q: why the US did this attack?
The US is retaliating because they want to stay there and that sends a message to all that we will do anything to prevent further attacks against US bases.
And give the message to Israel that we are doing our duty in the best possible way. See below for this:
Brett McGurk, the White House coordinator for the Middle East and North Africa, said the US had four main objectives in Syria: to reduce violence, maintain military pressure on ISIL, address Syria’s humanitarian crisis, and to support Israel.
.. mostly unsuccessful attacks
This line says that our casualties were few and don't worry. (Families, etc.) and the situation is under our control.
Are the Iranian-backed militia groups same as IRGC …
What do you mean by "same as"? Do you mean they are all IRGC troops? No. IRAN is very clear in this line. IRAN unlike the US (that is always looking for a way to quickly send more than 2000 troops to any country) teach them to fish instead of giving them fish. But of course there are always a handful of IRGC members to guide and direct them.
NOTE: Maybe you don't know much about IRGC. it is normal among the western propaganda.
IRAN has two type of armies. One official army that is for defending the country and another army/militia known as IRGC. The road and goal of IRGC is completely based on the holy book of Muslims. that is helping to the oppressed (Muslims) men, women, and children in the world not just in the country. [Quran ch 4- 75]
As you can see, IRGC is helping Iraq (after US invasion), Syria (after US and ISIS), Lebanon (after Israel invasion and ISIS), Yemen (after KSA invasion and ISIS), Bosnia (During Serbia attack) and Palestine (75 years of Israel occupation), all oppressed Muslim countries. (Of course, with the official permission of that country.)
I want to add some important issues about illegal presence of US in Syria:
The unlawful US military presence in Syria is among the main destabilizing factors for the situation in the republic.
"Washington's policy aimed at maintaining a de facto occupation of vast areas in the northeast of Syria, which are rich in oil, gas, and agricultural resources, as well as ongoing illegitimate sanctions pressure on Damascus leads to a further deterioration of the social and economic situation," Russian First Deputy Permanent Representative to the UN Dmitry Polyansky said.
The US troops’ presence in Syria is an occupation and an illegal act.
No action can be taken in Syria away from the opinion of its government and its people,
The U.S. must respond to the Syrian government’s demand to withdraw from its territory and stop plundering its resources.
China calls on the US to withdraw its troops from Syria and to stop plundering that country
The Syrian government has constantly expressed its opposition to the US role in Syria, and demanded US forces withdraw.
Syrian diplomats implored the international organization to put an end to what they view as violations of international law and the UN Charter by the US, which has stationed troops illegally in the northeast and southeast regions of Syria.
As the history of the United Nations and the United States shows, even if it were against all international laws, humanity, etc. (as Israel recently committed a war crime in a Gaza hospital and no one did anything), no one can do anything but World War III begins.