It's possible that the business is making a bet that the married person needs better compensation to be stay at that job, simple supply and demand.
OR, as the article states, it has nothing to do with marriage and the married person is better at their job and gets to push their weight around more where scheduling is concerned.
If two people are in competition for the same resource (a more desirable shift), someone is going to lose. The company has to choose one of them, making at least one happy, or neither of them, upsetting both. How are they supposed to "not discriminate" here? They are forced to choose which employee should receive the shift.
Bear in mind that if the tables were turned, the other guy would be going all over the internet saying "My employer gave this shift to another guy because they hate children and discriminate against families with kids", and the same responses would be had in the opposite direction.
Making these choices is always going to alienate someone, but they're a fact of life.
People who can't arrange their work schedules to spend time with their kids often find other jobs. If the company has 2 people who want the same shift, management has to make a choice, and choosing the one most likely to impact the company by leaving is a reasonable decision.
OR, as the article states, it has nothing to do with marriage and the married person is better at their job and gets to push their weight around more where scheduling is concerned.