Cubes have their datum at the corner. This means that grabbing the scale handle causes them scale around the corner instead of the center of the object. Sphere’s have the datum at the center. So if a sphere and a cube are centered on the same point, scaling them one at a time results in correctly scaled but no longer centered objects. It makes sense, but it’s annoying to me.
Trying to model this entrapment cube was difficult until I found a simple work-around and then it was trivial. Add a sphere and center it in the cube. Select the sphere first, then the cube. Grab the sphere’s scaling handle and both objects will scale around the center of the sphere. Delete the sphere when finished.