One of the meanings for faggot was originally as small bundle of sticks used as fuel and so cigarettes looked like faggots ergo it got shortened to fags. (A faggot in England is also a type of food - it's a ball of chopped seasoned liver that's baked or fried.) A thong originally just meant any strip of leather and so it's meaning for a flip flop retained that meaning because of the said strap. In the US the underwear "thong" displaced the footwear "thong" meaning in the few places (e.g. New York) where flip flops were originally called thongs. So there you go.
"I'LL TAKE IT"
"You mean you're going to give that to me!"
And people from Australia call flip flops thongs.....?