I think and hope their comments come from a good place.
My DM said similar things, such as, "I tried with your DB but I hated it and gave up after six weeks." I was adamant when I found out I was pregnant that I was going to breastfeed so when she would say this every time breastfeeding came up in conversation, I saw it the same way as you OP and found it so negative. It made me more determined to breastfeed though, it didn't put me off. I would say, "Well it doesn't mean it's going to be the same for me"
In reality, DS was born prem. I expressed for six weeks and had enough frozen breast milk to last me another month, because DS could only have a very small amount of milk through a tube, so I was expressing more than he could possibly consume. The first time I attempted breastfeeding, he was two weeks old. I couldn't get him to latch, so a nurse asked if she could help. I said yes, as I was completely clueless. The nurse literally grabbed my breast and held DS's head and there was lot of grabbing and faffing about. It was a really unpleasant experience. He latched for about 30 seconds and stopped. I tried again a few days later, and DS latched off and on for a few minutes with the help of more faffing and a comment about the size of my nipples from the same nurse and this time some nipple shields. But he barely had any milk. I tried again but I hated it by this point.
I felt like there was a huge pressure on me to get it right and I couldn't. I just wanted DS to get bigger and healthier and my tiny drops of milk weren't helping. So we continued with expressing. But I began producing less milk when I expressed than when I first started. I burst into tears one evening and told DP I didn't want to breastfeed, I didn't want to express anymore. I was dreading telling the nurses the next day, but when I told one of them, she was really nice about it. She encouraged me to continue expressing for another couple of weeks and to gradually go longer between expressing. So I did. And just before DS came home, they introduced a prem baby formula, so he would have one feed of that, and the rest expressed breast milk. And eventually his formula to breast milk ratio was increased until he was just on formula. So in total I expressed for six weeks, and used up some of the frozen supply I had after that as we introduced formula. DS was on his prem baby formula until he was a year old, then moved on to cow's milk. I felt a huge release of pressure when we went on to formula.
If we have another, I would be clear from the beginning that I will be formula feeding.