This is something you will need to get used to when playing poker. Sometimes the worst
hands and the worst play wins.
You cannot look at the hand in isolation, but rather, if you played the hand in the same way over and over and over again, would it be profitable? Yes it would, so you should not worry that you lost this one hand. The guy sounds like he over valued his 88 and got lucky to spike his set. Overall I want to play this guy every day.
In terms of playing correctly or not, you need to provide more details. Was it a cash game or tournament, what were yours and the villains stack sizes, positions on the table, other players in the pot, any information you might have about the villain's style and range.
On a very basic level, I don't think there's too much wrong with your play. 5BB is a large raise pre-flop and might scare all your opponents off, in which case you're leaving money on the table, but maybe the table is playing loose so you'll get paid off, I don't know. I'm also assuming that there are not straights or flushes out there, in which case triple barrelling is fine too.