In the early church many were attempting to understand the divinity of Christ, and in extension the Holy Trinity. Today, we have the benefit of the Church correcting false ideas. However, when these ideas were formulated there was not a dogmatic decree regarding the Trinity though the dogma had been taught in the earliest days of the church. The heresies of Monarchianism, Sabellianism, Subordinationism, and Arianism required that the church formally formulate the Trinitarian doctrine.
Dynamic Monarchianism taught that the Father was true God, and that Christ was a man who was indwelled with a divine spirit (Preuss 126). Patripassian Monarchianism takes it a step further by acknowledging Christ as divine but does not go far enough as the two are not of the same substance. Sabellianism, or Modalism as it is also called, taught that God manifested himself in different modes and that there was only one person of the Godhead. In short, God was made up of one person (Garrigou-Lagrange Ch.5). Arianism denied the divinity of Christ and taught that He was a creation of the Father (Lecture Notes), and this was also the Arian view of the Holy Spirit. In that regard, he was subordinate to the Father. The heresies mentioned all have elements of subordinationism, because in various respects the divinity of Christ and the Holy Spirit is lowered.
With these heresies being taught the souls of the faithful were at risk. The church rightly saw that an attack on the persons of the Trinity was a salvific issue. Afterall, if Christ was not fully divine then his sacrifice on the cross meant little or nothing. The church responded to the heresies, and formally defined the Trinity at the Council of Nicea in 325.
Garrigou-Lagrange, Reginald. The Trinity and God the Creator. https://www.ewtn.com/library/THEOLOGY/TRINITY.HTM#05, accessed November 13, 2018.
Preuss, Arthur. The Divine Trinity. https://archive.org/details/divinetrinityad00pohlgoog, accessed November 12, 2018.