I don't understand why people keep saying that we didn't get the motivation behind that.
All we've seen of Stannis is him being under the thumb of Melisandre and she is the one who pressured him to do that and he does literally everything she tells him to do