History. The US invented a shaped-charge hand grenade just before WWII. But it was too heavy to get much range and work was done to combine it with a rocket and the bazooka was created in 1942. German troops in N. Africa captured some and it was copied and improved to create the Panzerschreck (Armor Terror). The Germans had been working on a parallel, but different design in 1942, the Faustpatrone, which was the predecessor to the Panzerfaust, which entered service in 1943. The Bazooka and Panzerscheck were rockets that were enclosed in a tube. Warhead size, and therefore penetration, were restricted by the tube diameter. The Panzerfaust, RPG-2, RPG-7 use a gunpowder charge to expel the warhead from the launcher. In the case of the Panzerfaust, that was it, which greatly limited the range. The RPG-7 has a rocket that ignites a safe distance from the shooter.
In brief, because we know this, there are a multitude of anti-tank weapons. In WWII, you had Tanks, anti-tank guns, Tank Destroyers, and at the infantry level, bazookas, Panzerschreck, Panzerfaust and anti-tank grenades. The infantry deployed weapons were developed to give infantry something to use when they didn't have tanks, etc. for support.
Bazookas, recoiless rifles, RPG's, TOW's, MILAN, AT-11, etc. are all crew served weapons, some of them pretty heavy and not really man-portable. So things like the LAW M-72 were developed to bring it down to something the individual could be issued. The tube was disposable to reduce the cost and weight. Really, a return to the Panzerfaust idea. The diameter of the warhead largely determines the penetration of the shaped charge. The larger the diameter, the greater the armor penetration. So as tank armor improved, small diameter rockets like the LAW became ineffective against MBTs unless you got them from the flank or rear.
In tube or outside the tube. The RPG-7 can use different rockets with different sized warheads for different purposes. The normal anti-tank rocket has an 85mm dia warhead. But because the rocket is loaded into the front of the launcher with the warhead exposed, it doesn't matter. The Carl Gustav has an 84mm dia warhead that is entirely enclosed, hence the larger diameter tube. Plus it is a recoiless rifle. It can have a rocket assist, but normally all of the propellant is consumed inside the launcher. The other main design difference is the stabilization. The Carl Gustav has rifling to impart spin to the shell. The RPG has pop-out fins that also impart a slow spin. The RPG is more susceptible to wind drift because of the long lever arm between the fins at the rear and the warhead at the front. Wind has more effect on the light fins so in a cross-wind, the RPG rocket will turn into the wind, not downwind.