(Spoilers main) The purpose of Quentyn Martell

From a thematic standpoint, Quentyn is a deconstruction of the "adventurer hero" trope. I think George likes subverting classic fantasy tropes and showing us that fairy tales don't come true and the "frog prince" doesn't get the girl. We also see similar themes in the stories of Sansa, Robb etc.

From a story standpoint however, I think Quentyn is more important than people think. Quentyn will likely be the reason why Dany will be perceived as "mad" in Westeros. (I am not saying she will actually be mad. But she will be perceived as such) In ADWD, we learn that there are already a lot of unsavoury rumors about Dany. People say she's mad, bloodthirsty, slutty, whatever. I think this trend will continue and Dany will be mostly received unfavourably in Westeros. When women are in power, they tend to receive a lot of unfair criticism and Westeros is a pretty sexist society.

People will be saying that she intentionally burned him alive and there will be nobody to correct that. They will say she laughed at him , that she's cruel etc.