Randomization in a non-random sample can still show an effect is not reasonably explained by random variation.
For example imagine we have a population with two unrecognized subgroups (with somewhat different characteristics*) of roughly equal size, but your sample is non-random, giving an 80/20 split. Let's imagine 2 treatment groups of equal size. Randomization (at least with decent sample sizes) will tend to give close to that 80/20 split in each group, so that treatment effects are due to the treatment, rather than unequal allocation of the heterogeneous groups to the treatments.
* leading to different baseline means, say
The problem comes when you want to extend the inference to some target population other than what your sample is representative of (the self-selectors); this requires assumptions/an argument for which you may have no evidence (such as assuming that say the treatment differences will be consistent for all subsets of the population).
For a similar situation, imagine testing a hypertension drug only on men, compared to a standard treatment and placebo. Assume the men are properly randomized to treatment group. A treatment effect will be real in the sense that it really does describe an effect in men. The difficulty will come when trying to extend that inference to women.
So if they're properly conducted and randomized apart from the recruitment, an observed significant effect will be what it seems, but it will apply to what you actually sampled, not necessarily what your desired target was -- crossing the gap between the two may require careful argument; such argument is often absent.
When I was a student it was quite common for psychology experiments to be conducted on psychology students, who were expected to volunteer for a certain number of hours of such experiments (this may still be the case but I don't have regular contact with psychologists who do experiments any more). With randomization to treatment, the inferences may have been valid (depending on what was done) but would apply to the local population of self-selected psychology undergraduates (in that they generally choose which experiments to sign up for), who are very far from a random sample of the broader population.