BitmapData confusion

Lets say i have an image in the library with ID “someBitmap”.

Due to the fact that the BitmapData constructor requires at least two arguments, i can use the following code to display the image:

var container:Bitmap = new Bitmap();
var myBitmapData = new someBitmap(NaN,NaN);
container.bitmapData = myBitmapData;
this.addChild(container);

In that case, the value of the BitmapData arguments have no impact to the actual size
of the displayed image.

Executing the following code,

var container:Bitmap = new Bitmap();
var myBitmapData = new BitmapData(NaN,NaN);
myBitmapData = new someBitmap(NaN,NaN);
container.bitmapData = myBitmapData;
this.addChild(container);

gives an Error. Here the compiler requires in the new BitmapData(NaN,NaN) two numbers
as arguments instead of NaN. But anyway, putting in the numbers also has no impact
to the size of the displayed object.

So where is the logic behind that?