Is there any situation when text should be center aligned (horizontally) in an input?

I recently tried to use some animations in my design and I checked some nice examples as inspiration, like this: "Inspiration for Text Input Effects". Some of them had the text centered.

enter image description here

enter image description here

I know it is just an example to illustrate the animation, but I was wondering if it is any case when it is a good idea to center the text in a field and not to let the user write from left to right (on mobile, if the value is limited to a small number of characters or anything else). What do you think?