I often find the following definition of an algebraic variety:
Let $A$ be a commutative ring with unity, $I\subset A$ an ideal, then the algebraic variety associated to $I$ is defined as $V(I):=\{\mathfrak{p}\in \text{Spec(A)}\mid \mathfrak{p}\supset I\}$
In other textbooks, there is also this one:
For an algebraically closed field $K$, $A:=K[x_1,...,x_n]$ and an ideal $I\subset A$, the algebraic variety associated to $I$ is the set $V(I)=\{(a_1,...,a_n)\in K^n\mid p(a_1,..,a_n)=0\,\,\forall p\in I\}$.
Since every maximal ideal of $K[x_1,...,x_n]$ is of the form $(x_1-a_1,...,x_n-a_n)$, the last definition is, morally speaking, the same as $V(I)=\{\mathfrak{m}\in \text{Maxspec}(A)\mid\mathfrak{m}\supset I\}$.
The second one seems more concrete, since maximal ideals are like points, but I don't know what is the motivation for the first one, which adds up more elements to the variety.
What is the need for two different definitions? Why not just stick with one of them? What are the advantages/disadvantages of each?
This is an excellent question and can be explained using the "functor of points" point-of-view. If you know the following statements:
your question falls out easily. For example, let $$ I=(f_1(x_1,\ldots,x_n),\ldots,f_k(x_1,\ldots,x_n)) \subset \mathbb{Z}[x_1,\ldots,x_n] = R $$ be a reduced ideal (meaning the quotient ring has no nilpotents). Then $$ \text{Hom}_{\textbf{CAlg}_\mathbb{Z}}(R/I,A) \cong \{p\in A^n: f_1(p)=\cdots=f_k(p) =0 \} $$ In fact, a variety can be defined as a reduced scheme of finite type over a field (although many people add an integrality assumption when you base change to an algebraically closed field).