We have some sound deduction system (every provable sentence is true), which has property of principle of explosion and some theory T described in that system. Lets assume that theory T is inconsistent($P$ and $\neg P$ both belongs to the theory). Because of principle of explosion you can prove some contradictions $Y$ and $\lnot Y$ which both will be true thanks to soundness. That I suppose shows that there is no possibility that you could create inconsistent theory but it is not true because you can always create theory such as $\{P, \neg P\}$ and prove some other contradiction.
What is wrong with this reasoning?