The formula for a primitive Pythagorean triangle is:
$$ x = m^2-n^2 \\ y = 2mn \\ z = m^2+n^2$$
where $m$ and $n$ are co-prime, and not both odd.
If you disregard the conditions on $m$ and $n$, you can get non-primitive triangles. Let's violate the first condition, making $m$ and $n$ not co-prime, e.g. they have a factor $k$ in common. Let $m=kr$ and $n=ks$. Then we get:
$$ x = (kr)^2-(ks)^2 = k^2(r^2-s^2) \\ y = 2(kr)(ks)=k^2 2rs \\ z = (kr)^2+(ks)^2 = k^2(r^2+s^2)$$
Here we have a factor $k^2$ times a Pythagorean triple that uses $(r,s)$ as its parameters instead of $(m,n)$.
Suppose we violate the other condition, by making $m$ and $n$ both odd, i.e. $m=2a+1$ and $n=2b+1$ for some integers $a$ and $b$. Substituting this we get:
$$ x = (2a+1)^2-(2b+1)^2 = 2*2(a+b+1)(a-b) \\ y = 2(2a+1)(2b+1) = 2(a+b+1)^2-2(a-b)^2\\ z = (2a+1)^2+(2b+1)^2 = 2(a+b+1)^2+2(a-b)^2$$
Here we have a factor $2$ times a Pythagorean triple that uses $(a+b+1,a-b)$ as its parameters instead of $(m,n)$.
Conversely, if we scale a primitive Pythagorean triangle by $2$, or by a square $k^2$, or both (i.e. by $2k^2$), then that triangle can be rewritten in the form of a primitive Pythagorean triangle, except that it violates one or both the conditions on its parameters.