The US voted against it because it wanted a privileged status, which the rest of the world refused. Actually, that was not the first time that the US administration refuses reasonable safeguards responsive to its 'legitimate' concerns and ends up standing alone against the will of the world, only to be beaten back. It stood alone again in Rome. Another country that voted against the world was Israel. The Jewish State objects to one of the court's articles which makes it a war crime for Israelis to settle in Arab territories captured in 1967.
China is excessively sensitive to issues of national sovereignty.
Libya has an on-going legal problem on Lockerbie. I do not know the considerations that went into the Algerian and Qatari decisions. I do not see any reason, except, and maybe, US influence. It is no secret that as the US demands on the ICC were refused, Washington worked over time to spread concern among military dictators around the world that the Rome conference was something they should be concerned about. Experience has shown that rogue regimes are rarely willing or able to call their own gross human rights violators to account, especially those in positions of authority.