It is not clear that companies should “ensure” diversity. However, it is clear that they should accept diversity if it occurs. It is not a good idea in most cases for firms to pursue diversity for its own sake. Instead, firms should take the most qualified candidates regardless of race or other attributes.
There are two reasons why it is important for firms to encourage, or at least accept, diversity. First, it is ethically the right thing to do. It is not right for firms to reject workers or to treat them poorly simply because of their race. Firms have the duty to treat people fairly.
Second, it is financially better to encourage or accept diversity. One reason for this is that any moves to prevent diversity can end up causing lawsuits. Defending a discrimination suit is not a cheap thing to do. Losing a suit can harm the firm financially and can also make it look very bad in public opinion. The other reason is that rejecting employees based on their race or sex can reduce the quality of a firm’s workforce. If you are only willing to take employees from one race, you are preventing yourself from benefitting from the talents of workers of other races.
For these reasons it is a good idea for companies to encourage diversity, though it may not be a good idea to absolutely ensure it.