Do you think that every failed A/B test should be not a valid business expense? Only winning tests are valid business expenses?
If an employee is paid for a sick day, PTO, or parental leave, or to attend a team-building event: what have they created with that money? The government must not allow such giveaways from the tax coffers!
All kinds of individual activities are permitted in profit-seeking businesses and not all of them are subject to “in order to deduct this, you have to have omniscient judgment and every individual action must locally optimize your business”.