Actually, rockets are very different from artillery, even though they do somewhat the same things ("rain" death and destruction on enemies) from the air.
Artillery fired out of "guns" is relatively accurate. That is, it can be counted on to hit a target a few miles away. A "rocket" couldn't be counted on to hit a specified target at ANY distance for most of the 19th and 20th centuries. (Maybe that's different in the 21st century but the question doesn't cover that time frame.)
The advantage of rockets is that they can be fired form ultra long ranges (thousands of miles through earth and space) with an accuracy in that order of magnitude.
There is a saying that if the Chinese fired their intercontinental ballistic missiles at Los Angeles, they might end up in Arizona. Even so, it illustrates the point that rockets are "good" weapons compared to others fired from halfway around the world, if the intended target is "anywhere in the United States."
(Note to commenter: U.S. ICBM's are quite a bit more accurate than the Chinese ICBM's mentioned above.)