An executive order banning workplace discrimination on the basis of sexual orientation and gender identity by federal contractors might also be the first step toward federal legislation outlawing the same for all employees.

Today, discrimination against lesbian, gay, bisexual and transgender people is disturbingly common. Recent research by the Williams Institute on Sexual Orientation and Gender Identity Law and Public Policy at the University of California, Los Angeles, found that 27 percent of lesbian, gay or bisexual people had been harassed at work or lost a job because of their sexual orientation in the previous five years. Almost half of transgender people in a recent survey had experienced discrimination in hiring, promotion or job retention. Discrimination hits gay and bisexual men, in particular, in their paychecks: studies show that they earn less than heterosexual men with the same qualifications. And as James Friso’s case demonstrates, even heterosexual employees can experience anti-gay harassment.

The president can’t assume that state and local laws already protect lesbian, gay, bisexual and transgender people. Yes, 21 states have outlawed sexual-orientation discrimination, while 16 also forbid gender-identity discrimination, and many cities and counties have similar nondiscrimination ordinances. But only about half of the United States’ population lives in places with such laws, leaving millions of workers vulnerable.

In the past, executive orders setting standards for contractors have not only put an American ideal of equal opportunity into practice; they have also helped show employers that ending discrimination is good for business. Employers who act out of bias waste valuable training and often pass over the best person for the job. In the case of gay and transgender workers, workplace discrimination comes with an added cost to employers, leading other lesbian, gay, bisexual and transgender workers to fear disclosure and contributing to stress, illness and lower productivity.

Perhaps the most convincing evidence that nondiscrimination policies are good business policy comes from businesses themselves. A recent Williams Institute study of the 50 largest federal contractors and the 50 biggest Fortune 500 companies found that nearly all had policies against sexual orientation discrimination, and almost all said that diversity was good for business. They also described their policies against sexual-orientation and gender-identity discrimination as a sound business decision, resulting in more productive and loyal employees, more good ideas and a stronger customer base. That means the federal government and American taxpayers get more efficient contractors, whether for designing software applications or supporting troops in Afghanistan.