It’s from way back when computers only had text interfaces. A filled rectangle showed you where the next character you type would appear. And I guess they made it blink for several reasons.
It makes it easier to see. It makes it easier to tell apart from other letters and symbols. And if it is on top of an existing letter it enables you to see that letter. And I guess it’s a nice call to action; see that blinking thing -> do something with it.
With time it was thinned to a line but it still shows the user where text will appear when they press a key on their keyboard. And now that it is so thin the blinking still makes it easier to see.