Regarding the first part of your question. I believe it is more correct to say that $D$ is an indicator for assignment of treatment. Thus the assumption is that the choice, whether an individual gets treated or not, is not correlated to possible outcomes.
The problem is the possible selection into treatment. It may be that treatment is assigned (or there is self-selection into) to those who are going to benefit most from it. For instance, suppose there is some training that improves academic achievement and you want to measure its impact. However, students are not assigned randomly for this course, but it is chosen mostly by those who have excellent computer literacy. In this case, if you estimate treatment effect of this particular training, you compare the outcomes of participants (mostly computer literate) to non-participants (mostly not computer literate). Thus the result would be biased as the outcome is partly dependent on selection of individuals to be treated. Selection bias should be evident if assignment to treatment correlates with outcome.
If there is such non-random assignment to treatment and you know that the assignment depends only on characteristic $X$ (in this case computer literacy), you make an assumption that after controlling for $X$ both the treated and non-treated groups are equivalent in their remaining characteristics, except that some of them got treated and others not. So the difference between outcomes of the treated and non-treated can be attributed only to the fact of being treated, not that the individuals in groups were different from the beginning. Conditional on $X$ you assume that assignment to treatment is random, so it cannot correlate with possible outcomes.