Where you're getting confused is in how shutter speed affects flash exposure vs. ambient exposure. If you typically don't use a flash, you assume that a longer shutter speed will create a brighter exposure, no matter what.
In most situations, a flash burst is many times faster than your shutter speed. Keeping the shutter open for a longer period of time will only increase the amount of light you gather from the ambient (everything that isn't the flash burst), NOT from the flash. You've already gathered all the light from the flash you're going to while the shutter was open. Leaving it open for longer won't add anything from that light source.
The reason your camera switched to the longer shutter speed is that in Av/Tv modes, the assumption is that you're using the flash for fill. That is, most of the exposure in the image will come from the ambient light, with only a small amount of light coming from the flash. In P mode, fill is the default behavior, unless a lower ambient light level is sensed, at which point, it will switch to the flash being the main source of illumination (key light)--your flash-to-ambient balance will be more towards the flash side of the equation than the ambient.
The reason, however, that both of your images look so similar is that everything in the scene is close enough that it's lit by the flash. If your cat were another 10' away from the wall, your first image would probably show a darker background, while the second one would show a lighter one. But the cat's exposure would remain the same, because that's what you've told the camera is the important subject to meter off for the TTL power-setting of your flash.
This is also why if you want exact control over flash/ambient balance, it's best to shoot in M mode on the camera. In M mode, you can manipulate the iso, aperture, and shutter speed, even with eTTL, so that you can balance the background against the flash wherever you want along the spectrum, not just at the ends as a strong key or a faint fill.
See: Neil van Niekerk's Tangents article on dragging the shutter.