You can expect a certain amount of slide/frame motion on an unloaded (and sometimes loaded) service grade handgun. The tolerances of service grade weaponry are looser than those of target pistols since they're expected to perform potentially lifesaving action under possibly adverse circumstances. Dust, dirt, mud, blood, sawdust & beer come to mind, as does the neglect of the owner.
Mechanically, the barrel locks into place in the slide. You'll note the sights are on the slide. Since the weapon is directed by the user with reference to the sights, slight movement of the frame isn't an issue. The entire weapon in your hands will do more to scatter shots than any slide/frame movement.