If you're talking about the big plug-looking things, they're supposedly to "blow carbon particles out of the exhaust baffle."
You're supposed to remove the plugs, start the engine, rap the throttle and bang on the muffler with a rubber mallet, then temporarily place a towel over the end of the exhaust so it comes out through those two holes and blows out carbon particles.
All my dualsports have had them but I've never taken them out. My KLR no longer has a baffle so it doesn't matter.
In theory, anyway, that's their intended purpose.