This swordfish probably got curious since it's still a young one and decided to wander in shallow waters lol. It's nice to see creatures like this although it could be dangerous for the fish. Not every people would be friendly when they see creatures like this. Others would try to catch it and they use it as a trophy or just play with it which is just sad. It's better to just watch them then leave them be.