Martha Jones gets so much unnecessary hate! I think for one reason is that she was the companion straight after Rose’s departure. Because she was such a popular companion, a replacement seemed offensive.
Martha has done so much though! She had to live in 1913 for three months posing as a maid where she suffered racial and sexist abuse just so she could help the Doctor come back. She endured a year of hell to save both the Doctor and the world from the ruthless Master and she risked her own life trying to save him when the Sun possessed him.
Martha leaving was a brave and hard thing to do but after everything she had been through, she just got seen as second best. I think she made the right decision to leave!