Ah, Hawaii. The resplendent luaus and awe-inspiring volcanoes. Tom Selleck and his mustache running around private-investigating stuff. The beautiful white-sand beaches made of fish poop.

Oh, that’s right. Your precious Hawaiian beach vacation was actually a frolic through epic amounts of doody. Specifically, the doody from a very special kind of critter: the parrotfish. You see, parrotfish are quite partial to the algae that grow on coral, and they gnaw it off with two impressive rows of fused, beak-like teeth (hence their name). Simply by chewing on reefs, a large Hawaiian parrotfish can ingest a coral’s calcium carbonate and poop out up to 800 pounds of sand each year, according to marine biologist Ling Ong of Hawaii’s SWCA Environmental Consultants. One Australian species, she notes, produces up to one ton per year.

And the parrotfish isn’t alone here. “In places like Hawaii, where we have very little terrestrial input of sand, almost all of our sand is of biological origin,” Ong said. “So I like to tell people that the sand you're standing on in Hawaii has probably gone through the gut of something. It'll have gone through the gut of a parrotfish, a sea urchin, some kind of worm.”

Parrotfish come in staggeringly beautiful colors, unless you're color blind. In which case, you'll have to just take my word for it. John Johnson

Parrotfish, though, serve a far more important purpose in their grazing. Algae is a major threat to corals, positively smothering them and stealing their precious light. Parrotfish play a huge role in keeping algae in check, though they can get a bit carried away. Some species have evolved to not only skim the algae off the top, but gnaw a few millimeters down to reach algae that has penetrated the coral. Overall, though, they’re the reef’s benevolent and indispensable gardeners.

Now, if you’re anything like me, you considered eating chalk at some point in your childhood. Luckily I never did—which isn’t to say I didn’t come close—because blackboard chalk used to be made of calcium carbonate, exactly what coral is made of. And when calcium carbonate mixes with acid, it fizzes like crazy. “It creates carbon dioxide,” said Ong. “So if you're a regular animal and you had acid in your stomach and you ate a chunk of chalk, you would get fizzy quickly. It would be generating a lot of gas.”

So why aren’t parrotfish spontaneously exploding all over the reef? Well, they don’t have stomachs. They simply gnaw off the algae and calcium carbonate and grind it up with teeth at the back of their throat known as pharyngeal jaws (the same jaws, by the way, that the moray eel has evolved into horrifying forward-thrusting chompers like those in the queen from Alien). Their digestive systems then take up the nutritious algae while firing out the calcium carbonate as sand.

Mucus Sleeping Bags and Polychromatic Sex Changes

All of this beach-building is exhausting work, and indeed the parrotfish is a strangely heavy sleeper. Like, dangerously heavy. “They don't wake up easily at all, which makes them fairly easy to catch,” said Ong, “because you can go down and shine a light at them and they'll be sound asleep. And the ones you do catch, you put them in a dark bag and they go back to sleep.”

Ong isn’t sure why exactly they need such deep sleep, though it wouldn’t seem to make much evolutionary sense. Why leave yourself so vulnerable?

Well, younger, smaller parrotfish, which are of course more susceptible to predation, have a brilliant little trick. They tuck themselves into a crevice or under a ledge and secrete mucus to build a translucent, semi-solid sleeping bag, which balloons to encase the parrotfish in a water-filled bubble. It’s likely a measure to mask their scent from predators, or a kind of proximity sensor to detect when something is closing in. And when they wake up in the morning, they’ll recycle the cocoon by eating it for breakfast. Try doing that with your sleeping bag the next time you go camping.

A parrotfish demonstrates the world's most ineffective force field. John Johnson

But their heavy sleep makes the larger individuals extremely vulnerable to spearfishers, who target the easy prey at night. And while losing an individual parrotfish every once in a while to fishing may not seem like a huge deal, the way parrotfish societies are set up makes this kind of hunting a serious threat.

You see, most parrotfish species are sex-changers. Individuals are born female and form into schools. Once they’ve matured, the largest female will change into a male, assuming rule over the school, which essentially becomes his harem. He begins managing territory, chasing away rival males, and transforms his drab skin into the gaudy colors in the photos above.

Yet this color shift doesn’t happen every time. Some males eschew the lovely new outfit in favor of a more sneaky strategy: They pretend to still be female. “So when it comes to spawning, they can sneak in,” said Ong. “When the males and females spawn—either in the territory, or some of them actually congregate in a place and they group-spawn—the sneaker males can insert themselves in there. And there are a fair number, so it's a reproductive strategy that must work.” (The giant Australian cuttlefish actually does the same, with males manipulating their arms to look like females, sneaking under dominant males to steal a kiss with their mates, and by steal a kiss I mean hand her bundles of sperm.)

If you're going to sleep like a rock, you may as well look like one too. John Johnson

Now, it’s great being the big man on campus—until a bigger bully shows up. “This is a fish that a lot of Pacific Islanders like to eat,” said Ong. “And normally they target the biggest fish, and that causes a problem for these kinds of sex changes, because you're taking a lot of the males out of the population. And you're also taking a lot of the big females out of the population, and they're the ones that are creating the most young.”

Indeed, the creatures are overfished in most parts of the world, setting off a domino effect that leaves coral, already struggling to survive climate change, at the mercy of algae. And interestingly, according to Ong, parrotfish seem to be getting smaller. Could we be artificially selecting against the largest individuals by removing them from the gene pool? After all, we seem to have done the same with elephant tusks, poaching individuals with the most ivory and keeping them from passing along their genes for such size.

Really, it’s no way to treat such a wonderfully bizarre fish, much less a creature that’s building our beaches free of charge. So the next time you’re lounging in the sands of Hawaii, take a moment to appreciate the parrotfish, which only ever wanted to gnaw on coral and sleep in its own snot, and maybe, if it’s lucky, undergo a sex change. And if that’s not one hell of an iconoclastic life, I don’t know what is.

A big thanks to Micah Wolf of Maui's The Snorkel Store for suggesting this week's creature. Browse the full Absurd Creature of the Week archive here. Have an animal you want me to write about? Email matthew_simon@wired.com or ping me on Twitter at @mrMattSimon.