Can an AT&T iphone 4 work by just simply placing a tmobile sim card in it?

My aunt gave me her iphone 4 with at&t and i shaved my tmobile sim card to fit the tray. I popped it in and automatically it connected to the tmobile network without having to unlock. My question comes to play because i lose my 3g connection if i'm downloading sometimes. Any way to fix this? Also i learned if it is in sleep mode while downloading it naintains a 3g speed. And i'm supose to get 4g with my tmobile plan.

It would have been unlocked in the past for the T-Mobile SIM to work, wasn't going to otherwise.

The iPhone 4 on T-Mobile depending on where you are is a problem since T-Mobile doesn't/didn't run iPhone friendly 3G, so basically they could only use 2G.
As far as 4G, the iPhone 4 is not a 4G phone so that's not coming either way.