Photographers are often confused by their camera’s behaviour, and this is not surprising since cameras are designed by engineers (I am an engineer, so I can criticize them).
Like how your allowed shutter speeds differ between brands.
When you select a certain exposure mode, the camera may restrict the shutter speed to keep it above a minumum. Here’s how Cannon and Nikon do that differently:
Canon has decided that in Av mode, any shutter speed will be allowed to make the background bright – even a second or more. Nikon has decided that in both program and aperture mode, there is a restriction to “above 1/60th second) (which you can alter on some cameras), unless you enable “slow flash” (which means “lift that restriction”).
These, remember, are just engineering differences. Nothing fundamental. But when you are shooting with a camera, you’d better know its behaviour.
And from the above, it is clear that flash pictures in dark environment should be taken in one mode: manual. Otherwise you will get dark backgrounds or blurred pictures.