I mean... it is shit but there isn't a lot to do in this situation.
You might think they should put the body in the bathroom or cargo hold. Actual direct access to the cargo hold during flight is not feasible on most passenger flights due to pressurization/climate and safety concerns. Also, if they don't have enough straps to tie down the body then that is going to be a REALLY bad PR mess when they remove a corpse that had been bouncing around and off of luggage during a landing. And if they do have enough straps, that is a completely different PR mess.
Same for the bathroom. For a 14 hour flight I assume this jet had multiple bathrooms. But you still have the problem of a body that bounced around a bathroom during landing.
Versus? You get it away from the family so they are less traumatized. You then put a blanket on it and buckle it in so that the body is safe.
It would really suck to be the people next to where teh body ended up. But if the flight was full? Having a flight attendant say "Excuse me. Is anyone cool with sitting next to a dead body?" isn't going to end well... and all but guarantees you get the kind of people who shouldn't be allowed near a corpse to volunteer.
MAYBE put them in a flight attendant seat but those tend to be near the galley which has its own health issues. And if it is a flight with sleeping quarters for the crew (likely for a 14 hour flight) that is both a safety concern (crew can't rest) AND all the same "body bouncing around" problems as the others.
As for what Qatar Airways should have done? Personally, I would have just offered the couple a shit ton of miles. A full refund isn't "right" since we have all sat next to things we don't want to (I would honestly rather sit next to a corpse than a morbidly obese person who insists on resting their arms over my body the entire flight...). And general counseling really isn't something the airline has on staff, although it would be nice if they offered to pay for some of it.