One thing that can be said is that Mashima-sensei really likes to add little quirks to his characters and Juvia is no exception to this. One of her many little quirks is that she uses illeism. What is illeism? How is it used? Why does she use it? This page is going to hopefully explore all of these questions.
Illeism is sometimes used in daily life and it can have different intentions based on the person using it. According to most literary places, illeism is defined as:
"the act of referring to oneself in the third person instead of first person."
One of the many uses for illeism is to show rank or humility. On one end we could have royalty speaking in the third person to have a sort of grandeur air about them or to stroke their ego. On the other end you could have a slave reflecting their diminished importance by saying "this slave" instead of "I". In group settings like the military it can also be used to show a united front. Another more modern use of illeism is sarcasm, however i am unsure of how to display an example of this.
In Japan, the way in which people are addressed are heavily engrained into their etiquette and mannerisms. In Japanese society, it is usually frowned upon when you refer to someone as simply "you" (お前). Mae literally means "in front of" and while an honorific "o" is placed in front, there is hardly anything honorific about it. It is considered a very generic way to address someone and shows no consideration for this: Your relations to other people in terms of who you are, where you are and how long you've been somewhere.
People who are younger then you may be referred to by their first name or without a suffix. People who are older then you may be referred to by a specific title, last name or have a suffix attached. It heavily depends on the situation. For example, if you are a middle child, you may refer to your younger sister as Amy, however your older brother Michael would have to be called "older brother" or "older brother Michael". What does this have to do with illeism? Quite a bit actually.
As mentioned above, they way you address people in Japan is very important and children in Japan start to pick up on this very early on. One of the fun steps along the way, and perhaps a sign of childhood, is them referring to themselves in the third person. They often hear family referred to by name and as such start referring to themselves by their name. To older people, when children use illeism, it is considered cute because they are learning the process. It is also considered cute because its very much a sign that they are children. Generally once children reach a certain age they start to learn and use specific first person identifiers such as masculine forms of "I" (俺 or 僕) and feminine forms of "I" (私). Older people, in particular teenage idols, like to bank on this "cuteness" and refer to themselves in the third person.
I highly doubt Juvia would do this to come off as smug or as humble. It is just not in her personality. However Juvia had a very isolated childhood. I feel part of the reason she refers to herself in the the third person is because she doesn't know any better. She was an orphan and she mostly grew up around other kids her age. So everyone was still in that third person phase. Even when in Phantom Lord, she did not socialize much beyond Gajeel and seldom Element 4. Who would be there to teach her otherwise? I doubt they would take the time to correct her. They probably didn't care.
I have noticed however over the course of the series she slowly starts to replace "Juvia" with "I". I'm not sure if this was intentional on Mashima's part or not. One can assume however is that with Fairy Tail being so open and loving, Juvia was therefore able to socialize more. This led to her picking up a bit more on social "norms" and the like. I say "norms" because really...no one in Fairy Tail is truly normal...except maaaaaybe Lucy. But i still feel it would be the right environment for her to do so.
Another possible reason is Mashima wanted her to have something that seemed to conflict with her initial appearance. Here was this dark and gloomy girl and she does something considered "cute" by referring to herself in third person.