When you buy this phone brand new, it comes in a T-Mobile package because it is only sold as a T-Mobile device. There is a similar device called Nokia Lumia 520 that is sold in various international and AT&T versions.
The phone was actually carrier locked when you bought it -- T-Mobile doesn't carrier lock devices that are already unlocked. However, they provided you with an unlock code which you successfully used. Now the device is permanently carrier unlocked.
Question (a): No.
Question (b): A hard reset will not change the carrier lock status. Your 521 will remain unlocked because you unlocked it two months after your purchase.
I don't know why the 3G data doesn't work. You will need to check with your local ISP to see if they are compatible with the HSPA bands supported by the Lumia 521. According to Nokia, the device supports these bands for 3G/4G data: 850 MHz, 1900 MHz, 1700/2100 MHz (AWS).