In probability theory, the "|" has a special meaning, not completely captured by the condition "such that". It's usually spoken as "given".
Probabilities are assigned to subsets of some space of possible outcomes. If A and B are sets in such a space then [itex]A \cap B[/itex] and [itex]A | B[/itex] both refer to the set of elements in [itex]A \cap B[/itex], but the probability [itex]P(A | B)[/itex] tells us that probability is to be computed as if the elements of the "space of possible outcomes" are only those elements which are in B while [itex]P(A \cup B)[/itex] tells us that the "space of possible outcomes" is the original space of possible outcomes.
Hence the meaning of the notation P(X) is not as simple as "P(X) means the probability of the set (or event) X". When the "|" sign is used, the P(.) notation also tells something about what is to be considered the space of possible outcomes.