There is no first or last in a set. It’s a sack of marbles, you know what you’ve added but now it’s all jumbled up.
When you work with a set, you have expectations about the content, so you request something very specific. All you get is whether it was contained or not:
Should I have to convert to array every time I want to get its elements?
If you’re working with a set, you already know what you’re looking for. The best you can do is to check if it’s there. But yes, if you want to actually iterate through content, it needs to be turned into the sluggish array again.
Perhaps you wanted to work with this instead:
A regular array but guaranteed to not have duplicates when used like this. Now you can get first / last element.