Division of an ordered list of values into bins, classes, or intervals with ideally equal frequencies will be frustrated in practice whenever
The number of data points is not a multiple (meaning, integer multiple) of the number of bins needed. As in the example, if you want two bins and the number of values is odd, the median can be included in the lower or the upper bin. Or, suppose you have 15 values; then any division into quartile bins is at best some variation on bins with frequencies 3, 4, 4, 4.
There are ties, as the only consistent rule is that identical values are assigned to the same bin.
Otherwise
(1) you decide on the rules
(2) you should make them explicit
(3) why are you doing this any way? If you had data on say people's heights, dividing them arbitrarily into tall and short groups isn't going to help much statistically, regardless of whether height is a response or a predictor.
Historically, quartiles, deciles, percentiles and so forth were points within a distribution, either individual values or summaries or estimates interpolated somehow between them. Only by extension are they the bins, classes or intervals so delimited. So, some people move back and forth between talk of lower (first) quartile, median and upper (third) quartile as three summary points -- and talk of the four bins they define. Usually the equivocation doesn't bite, but history is clear on the terminology.