For any equivalence relation on a set X, the set of its equivalence classes is a partition of X. Conversely, from any partition P of X, we can define an equivalence relation on X by setting x ~ y precisely when x and y are in the same part in P. Thus the notions of equivalence relation and partition are essentially equivalent. [Schechter 1997, p. 54.]
This seems obvious, but in truth, in my opinion it is not so easy. Say that "from any partition P of X, we can define an equivalence relation on X by setting x ~ y precisely when x and y are in the same part in P" for me is tautological and superficial conclusion because it is necessary to specify the reason why the definitions of "equivalence relation" (1) and "partition" (2) lead to define the first definition (1) from the second definition (2) or viceversa (from 2 to 1).
For example to talk about of partition we talk about of a Setoid. Often in mathematics, when one defines an equivalence relation on a set, one immediately forms the quotient set (turning equivalence into equality)
a setoid (X, ~) is a set (or type) X equipped with an equivalence relation ~
But what is the real motivation to have setoids where the definition of partition and equivalence relation seem to 2 identical objects but only with different roles?
For me, actually, "partition" and "equivalence relation" seem to be constructed to have and to ensure an access to the same object where setoid works as a partially ordered set whose ultimate goal is to generate not an order theory but a kind of abstract data type similar to queues used in computer science.
The definitions of "partition" and "equivalence relationship" do not seem to have been created to guarantee mathematical information, but an IT goal and for me these 2 definitions must be mathematically rewritten to reclaim a mathematical motivation.
In mathematics, it is very useful to have different interpretations of the same concept, here the set of equivalence relations on a set $X$ corresponds one-to-one with the set of partitions of the set $X$.
Suppose you want to enumerate all equivalence relations of a finite set $X$. To approach this problem, it is easier to consider the set of all partitions of $X$. The number of all partitions of an $n$-set is the $n$th Bell number $B(n)$. Partitions of a set are easier to study than relations with a ''sophisticated structure'' (reflexivity, symmetry, transitivity).