You got ripped off too. I had a hernia operation done in Cambodia in 2019 for a total of $US450 but was in and out in a day. Turned out to be the more serious femoral rather than inguinal. Generally travel insurance does not cover hernias treating them as an existing condition, so if you were covered, you were extremely fortunate.
What do you mean by 'keeping your Medicare' here? I am assuming you are referring to Medicare in the States, but what happens if you fall ill in Thailand and are unable to get home?