The transform is doing exactly what one would theoretically expect it to do. To get a better understanding of this, you might want to look at the result with some intermediate values of $T$ between $0.5$ and $1.2$. At $0.5$, you're getting back the proper top-hat function. As you increase $T$, you will still get a top-hat function, but the edge will move closer to the right-hand edge of the graph as you increase $T$, since the right-hand edge represents the value $1/T$. As $T$ reaches $1$, the edge of the top hat will reach the edge of the graph, and the entire graph will just have a constant value $1$. If you now further increase $T$, you're moving part of the top hat over the edge, into the part of the spectrum that can't be represented by the sampled values, and this part will get aliased. Aliasing works such that it "folds" the spectrum back onto itself, so instead of moving beyond the edge of the graph, that part of the spectrum gets reflected at the edge and added to the right-hand part of the graph. For instance, at $T=1.2$, the part from $1000$ to $1200$ can't be properly represented, is reflected at the $1000$ line and ends up between $800$ and $1000$ instead (with the component at $800$ corresponding to what "should" have been a component at $1200$, the one at $900$ corresponding to $1100$, and so on). That's why you're getting twice the correct value between $800$ and $1000$ -- half of this is the correct spectrum from $800$ to $1000$ and the other half is the aliased spectrum from $1000$ to $1200$.
To see why aliasing works in this way, look at what happens to a cosine just past the edge of the spectrum, say, $\cos ((\pi + \epsilon)x)$ sampled at intervals of $1$, i.e. $x\in\mathbb{N}$. Then we have
$ \begin{eqnarray} \cos ((\pi + \epsilon)x) &=& \frac{1}{2}\left(\mathrm{e}^{\mathrm{i}(\pi+\epsilon)x}+\mathrm{e}^{-\mathrm{i}(\pi+\epsilon)x}\right) \\\ &=& \frac{1}{2}\left(\mathrm{e}^{-\mathrm{i}(\pi-\epsilon)x}+\mathrm{e}^{\mathrm{i}(\pi-\epsilon)x}\right) \\\ &=& \cos ((\pi - \epsilon)x)\;, \end{eqnarray} $
so the frequency $\pi+\epsilon$ has been reflected at $\pi$, the highest frequency properly representable with this sampling, and folded back to $\pi-\epsilon$. The same would happen with a sine, except that we'd pick up an additional minus sign, but since sinc is an even function, we only have cosines in this case, so the aliased parts of the spectrum are added constructively to the "proper" spectrum.