Probably because sizeof(float)=sizeof(float*), and at a guess probably both are 4 bytes. But as soon as this changes, your program will stop working.

No, it doesn't matter, because the memory is allocated on the heap which is available to the entire program, not on the stack which is only available locally within a function.