Salesforce, the largest tech employer in Indiana, US has announced that it is allowing its employees to transfer out of the state in protest of anti-gay legislation that was recently signed into law.

The news comes a week after Indiana Governor Mike Pence signed into law the Religious Freedom Restoration Act – a bill that allows anyone to use religion as a defence if they are sued by a lesbian, gay, bisexual or transgender person.

In theory, this means that businesses in Indiana would be allowed to turn away gay customers in the name of religious freedom if they don't want to do business with them, and there would be no legal recourse for gay people that had been discriminated against.

On 26 March, when the bill was signed into law, Salesforce CEO Marc Benioff announced that all events involving Salesforce or the Indiana-based email marketing firm ExactTarget that Salesforce acquired in 2007 would be cancelled until the anti-gay legislation was reversed, as he did not want his "customers/employees to travel to Indiana to face discrimination".

But now Benioff has gone a step further - he is now allowing all employees in Indiana that are uncomfortable with the new legislation to transfer to other Salesforce offices in the country, and he is signing off on $50,000 (£33,740) relocation packages.

"We can't pull out of Indiana completely as we have thousands of employees there, but what we can do is say that you need to protect our employees and customers that we are bringing to Indiana, and laws like the one that we saw passed last week by Governor Pence are not acceptable," Benioff told CNN.

"This law is brutal, it is unfair and it needs to change."

Rallying tech CEOs together

Benioff has called for other tech CEOs in Indiana to join him in rallying against the anti-gay legislation, and in this he has succeeded.

On 1 April, over three dozen CEOs and other senior executives from Silicon Valley - companies including Twitter, eBay, Airbnb, Tumblr, LinkedIn, DropBox, Cisco, Yelp, Quip, PayPal and Y Combinator -issued a joint statement with Benioff calling for lawmakers to add sexual orientation and gender identity as protected classes to civil rights laws.

"The vast majority of our employees support that the law has to change, and we have employees who want to move out of the state of Indiana now. I've heard from our customers all over the world and 90% of the people I've heard from have been incredibly positive to the actions that we have taken and want the law to change," said Benioff.

"I'd say only 10% of the people I've heard from are upset that we would rebuff the governor and I can understand, as the governor is a great guy and very likeable, but in this case, the governor has made a huge mistake for himself and for the state of Indiana, and that must change."

Other companies that haven't yet signed the statement have raised concerns about the Religious Freedom Restoration Act including Apple, General Electric, NASCAR and NCAA.

But do they really understand the law?

Apple CEO Tim Cook wrote in an opinion editorial for the Washington Post on 29 March: "These bills rationalise injustice by pretending to defend something many of us hold dear. They go against the very principles our nation was founded on, and they have the potential to undo decades of progress toward greater equality.

"I have great reverence for religious freedom. As a child, I was baptised in a Baptist church, and faith has always been an important part of my life. I was never taught, nor do I believe, that religion should be used as an excuse to discriminate."

Cook compared anti-gay legislation to the racial segregation in the US in the early 20th century, saying that America needs to continue to be "a land of opportunity for everyone".

However, Bloomberg has pointed out that while Benioff and other tech CEOs are all making a fuss about Indiana law, the fact is, a very similar religious freedom law has been part of federal law for the last 22 years, based on a Supreme Court doctrine that has existed for several decades.

12 MacBook Air
Apple's CEO Tim Cook has written an op-ed in the Washington Post comparing anti-gay legislation to racial segregation in the early 20th century Apple

Apart from Indiana, there are also 19 states in the US that already have similar laws that do not protect against discrimination based on sexual orientation.

The Supreme Court law was introduced to protect people of different races and religions from being compelled by the government to violate their religious beliefs, and this law has been used to protect Muslims, Hindus and Native Americans in the past, for example, meaning that a Muslim prisoner does not have to shave his beard.

However, Bloomberg's Ramesh Ponnuru argues that allowing an individual to sue a company because the company refused him service due to his sexual orientation, is not how the original Supreme Court legislation was meant to work.

"The point of the religious-freedom protection is to keep government policy from imposing unnecessary burdens on religious practice, and so it shouldn't matter if it's an individual who is trying to get the policy applied," writes Ponnuru.

"But it's important to remember that these religious-freedom laws only create a legal claim for people who object to the application of a law. They don't guarantee that those claims will prevail – and, in practice, such claims haven't fared well in court."