Actually when it comes to the real world there are civilian models of some assault rifles that have the full auto capability removed which are legal to own with the right license. SMGs on the other hand are completely illegal to the best of my knowledge. (In both cases in the US, sadly despite living in Canada I seem to know more about US gun law than Canadian).
Sort of.
Yes, there are all manner of semi-automatic (one trigger pull = one bullet) rifle that are absolutely legal. No special licenses are needed, since they're just, y'know, an ordinary rifle, media hype aside. Since the gutters aren't red with blood since the Clintonian assault weapon ban expired, I'm hoping we're able to keep things this way, a few states (California, for instance) notwithstanding.
The issue with civilian versions of things like an HK MP5 or similar isn't always necessarily a legal issue. The primary issue of legality involved is dealing with specific laws governing "short barreled rifles," or SBRs. If it's a shoulder fired weapon with a rifled barrel (and even pistol barrels are rifled, nowadays), and the barrel is less than 16" long, it's an SBR. SBR's are classified as a Title II weapon. Title II weapons are short barreled rifles, short barreled shotguns (in this instance the cutoff is 18"), silencers, and machineguns, which are "weapons that shoot, are designed to shoot, or can be readily restored to shoot, automatically more than one shot without manual reloading by a single function of the trigger."
None of these are innately illegal, but it's expensive to be allowed to own one (expensive to an everyday citizen with an everyday job, at least). A special license and -- if this tells you where their real concern lies --
a $200 tax stamp per weapon is required.
Not many guys have the money to burn just for the "gee, whiz!" factor of owning a short barreled rifle. You'll still see SWAT teams (and ATF squads, naturally) with 'em, but you just don't bump into 'em at the range very often. Combined with import fees, combined with HK's elitist attitude towards civilian gun owners (for decades they even sold just their handguns to LEO and military groups) and their high prices already, long story short, submachineguns just aren't very common.