I assume either one of three things:
1. Terraria was easier to code because it was in 2D, compared to Minecraft being in 3D
2. Minecraft was started after Terraria, while Terraria stayed behind the curtain.
3. Both.
And because of #1 I also think we might start seeing twice as many clones for Terraria than for Minecraft, seeing as I could near replicate Terraria with some time, excluding all the fancy animations which I may or may not be able to do.