In the first place not the rules of algebra (distributivity, $\ldots$) apply here, but the rules of describing sets. If you are given a nested sum $\Sigma:=\sum_{j=a}^b \ \sum_{k=c(j)}^{d(j)} z_{j,k}\ ,$ each individual summand $z_{k,j}$ depends on the outer variable $j$ as well as on the inner variable $k$. Sometimes a factor depending only on the outer variable $j$ can be pulled out, but forget this at the moment.
The essential point is to get a clear picture of the set $S:=\{(j,k)\ |\ a\leq j\leq b,\ c(j)\leq k\leq d(j)\}$ of lattice points in the $(j,k)$-plane over which the double sum $\Sigma$ ranges. To this end draw such a plane with a horizontal $j$-axis and a vertical $k$-axis and shade the "region" $S$.
In most cases this region will be convex. This facilitates the rearranging of the double sum $\Sigma$ when we want $k$ to become the outer variable and $j$ the inner variable. There will be a $k_\min:=\min\{k\ |\ \exists j:\ (j,k)\in S\}$ and similarly a $k_\max:=\max\{k\ |\ \exists j:\ (j,k)\in S\}$, and for each integer $k\in[k_\min\ .\, .\ k_\max]$ there are two well defined numbers $a(k)$, $b(k)$, such that $\{j\in{\mathbb Z}\ |\ (j,k)\in S\}=[a(k)\ .\, .\ b(k)]\ .$ It follows that $\Sigma\ =\ \sum_{k=k_\min}^{k_\max}\ \sum_{j=a(k)}^{b_k} z_{j,k}\ .$ Now let's turn to your example. Here the set $S$ is given by $S:=\{(t,u)\in {\mathbb Z}^2\ |\ 1\leq t\leq T,\ t\leq u\leq T\}$ and is a "triangle" with vertices $(1,1)$, $(1,T)$, $(T,T)$. It follows that $u_\min=1$, $\ u_\max=T$, and for each given $u\in[u_\min\ .\,.\ u_\max]$ we have $\{t\in{\mathbb Z}\ |\ (t,u)\in S\}=[1\ .\,.\ u]\ .$ Therefore your sum $\Sigma$ under the envisaged rearranging becomes $\eqalign{\Sigma&=\sum_{u=1}^T\ \sum_{t=1}^u Z(u)(1+i)^{-u}\cr &=\sum_{u=1}^T\left( Z(u)(1+i)^{-u}\sum_{t=1}^u 1\right)\cr &=\sum_{u=1}^T u Z(u)(1+i)^{-u}\ .\cr}$ As $z_{t,u}:=Z(u)(1+i)^{-u}$ did not depend on the inner summation variable $t$ we could pull $z_{t,u}$ out of the inner sum which then became $\sum_{t=1}^u 1= u$.