That is extremely inconsistent and evidence of bias and prejudice in the local enforcement of law.
That is not inconsistent, as one is denying someone based on what they are, and the other is denying someone based on harassment. The gay couple didn't ask the baker to write on the cake that heterosexuality was immoral. There's an obvious difference between affirming the culture of the customer, and antagonistically denying the culture of the producer.
And I do think think that the baker's refusal was about what they are, since the conditions to bake the cake required that it didn't acknowledge what they are. It's like saying, "I will bake a cake for a black person, but only if it doesn't reference black culture in any way."