In the earlier model the fixed investment was a simplifying assumption made for didactic reasons (you dont want to overwhelm students), rather than because investment is actually fixed in general. In fact, it is not exogenous even in a full circular flow model (what you probably seen were simplified versions), but in a full circular flow model investment is actually dependent on income (investment is given by savings and savings are just unconsumed income) and endogenous as you can see below in a picture taken from Krugman Economics:

What you refer as the previous model was likely the basic goods market equilibrium for closed economy as in Blanchard et al Macroeconomics:
$$Y = C+I+G; \text{ with } C=b_0+b_1(Y-T)$$
The reason why investment in the above model is considered to be fixed/autonomous is not so much because it would actually be fixed, but because fixing it allows to make the model more simpler. However, this really models only small portion of the full economy as you can see from the picture above. There are actually non-IS-LM extensions of the basic model where $I$ won't be fixed and you just assume there is some additional function $I(Y)= a_0 + a_1Y$ and you could solve the model for the multiplier and everything else.
However, most courses will just first cover goods market equilibrium and afterwards move onto IS-LM model due to lack of time. IS-LM model will try to capture economy in its entirety so it will model the link between income and investment through savings in explicit fashion.
You will still have the goods market given by
$$Y = C(Y-T)+I(Y,i)+G$$
but now $I(Y,i)$ will depend on income and interest rate, which in turn also depend on equilibrium in the money (financial) markets described by LM equation ($M/P=L(i,Y)$). This really represents adding the arrow of private saving, borrowing and investments spending from the picture below into the model.
In summary, the main reason why it went from exogenous to endogenous is that in a sense that generally speaking it never was exogenous (a caveat is that more complex models can show that there are periods were it can be - but not generally and that whole another topic that is well beyond scope of this answer). The previous assumption was there so you can be first exposed to goods market equilibrium and multiplier idea without worrying about what happens to investment.