What is the advantage of defining an ordered pair $(a, b)$ as $\{\{a\}, \{a, b\}\}$? I've been studying set theory and have come across ordered pairs being described as a sets. Why is it beneficial to define the ordered pair $(a, b)$ as the set $\{\{a\}, \{a, b\}\}$? It seems to me that there are much simpler ways to define an ordered pair.
So we can tell the left element from the right, we could define $(a, b)$ as $\{a, a, b\}$. We can say that if an element is repeated twice it is the first element of the pair and otherwise it is second. With this definition we are able to decode the set into an ordered pair just like the first, so why choose the more complicated $\{\{a\}, \{a, b\}\}$?
 A: $\{a, a, b\} = \{a, b\}$, so your definition doesn't work.
In particular, remember that two sets are equal whenever they have the same elements. That is, given sets $x$ and $y$, if for all $z$, $z \in x$ iff $z \in y$, then $x = y$.
In this case, we see that $z \in \{a, a, b\}$ iff ($z = a$ or $z = a$ or $z = b$) iff ($z = a$ or $z = b$) iff $z \in \{a, b\}$. So $\{a, a, b\} = \{a, b\}$.
The definition $(a, b) := \{\{a\}, \{a, b\}\}$ is chosen precisely because under this definition, $(a, b) = (c, d)$ iff ($a = c$ and $b = d$). This is the only property of ordered pairs that matters.
By contrast, your definition of ordered pairs doesn't work because under it, $(0, 1) = \{0, 0, 1\} = \{0, 1\} = \{1, 0\} = (1, 0)$. But clearly $1 \neq 0$.
A: The ordered pair $(a,b)$ should be determined by the values of $a$ and $b$, and the order in which they are given. That's the only property of ordered pairs that are ever relevant.
Nobody actually thinks of the ordered pair $(a,b)$ as the set $\{\{a\},\{a,b\}\}$, just as nobody actually thinks of the number $\sqrt{2}$ as a Dedekind cut.
The only reason for defining $(a,b)$ as $\{\{a\},\{a,b\}\}$ is because it works: if we want to define an ordered pair in terms of a more primitive object, namely sets, then this definition has the effect that $(a,b)=(c,d)$ if and only if $a=c$ and $b=d$. By contrast, the definition $(a,b)=\{a, a, b\}$ doesn't work for the reason that Arctic Char has mentioned in the comments:

$\{a, a, b\} = \{a, b\} = \{b,a \} = \{b,b,a\}$ so $(a,b)=(b,a)$ using your definition.

Remember that the set $\{a,a\}$ is the same as $\{a\}$, and the set $\{a,b\}$ is the same as $\{b,a\}$. Because of these difficulties, we have to adopt the strange-looking definition $(a,b)=\{\{a\},\{a,b\}\}$ as sets aren't naturally suited at capturing ideas like the order of two elements.
A: There is no specific advantage. Actually there are many more ways to define an ordered pair as you can see here.
Also, the way you define it is not really very important. What is important however is that $(a_1,b_1)=(a_2,b_2)\iff a_1=a_2 \wedge b_1=b_2$ holds. That's the only property of an ordered pair we care about.
Now, in maths, we cannot keep anything loose- everything must have a proper definition. The way we used to define ordered pair in high school was circular, i.e., we defined ordered pair as an element of Cartesian product, and we defined cartesian product as the collection of all ordered pairs. So, we were intuitively clear what we meant by an ordered pair- only that it didn't have enough rigour in it. So, to add that sauce, we have to craft a definition which keeps all (in this case, only one) properties intact.
Also, $\{a,a,b\}=\{a,b\}$ (remember the significance of the word "distinct" in the definition of sets). So, your definition doesn't work.
A: @MarkSaving has offered a correct argument explaining why your alternative definition won't work. I will add a discussion of the "advantage" you ask about.
The only important features of an ordered pair those that follow from the fact that $(a,b) = (c,d)$ if and only if $a=c$ and $b=d$. How you define an ordered pair is irrelevant as long as that property holds. It's common  in mathematics to define everything terms of sets. If you want to define an ordered pair using sets then the one you quote is pretty much the simplest. That's its advantage.
