Photoshop supports two types of text: point text and paragraph text.
Point text is used for short lines of text. To add it, you click once on the page and start typing.

Paragraph text can hold multiple paragraphs in a text frame, and changing the size of the frame, changes the word wrap. To add it, you press your mouse down on the page and drag out a frame, and then start typing.

The layers look the same, so you can't tell which one it is until you click on the text with the Type tool. Illustrator has a feature that allows you to convert one to the other and back, but Photoshop does not have that feature, so I really don't think it's converting itself. I'm guessing that you are alternating between the two entry techniques, but hadn't really focused on it. I certainly see my students doing that prior to talking about the text features.
Your first screen shot has paragraph text, the second one has point text. You can resize the frame for paragraph text, and the text will readjust within. To resize point type, select the layer and choose Edit > Free Transform and resize. Press Enter when you are done.


One more thought... you can convert one to the other yourself with a cut and paste. Before you paste, either click or drag out the frame.