There are many examples. At the most basic level, environmental creatures like you mentioned show up in all sorts of odd places. Try hollowing out spaces near the first cavern layer and see what happens. A lot of the time you'll get cave spider webs showing up. Similarly, dwarven water works tend to get clogged by plants that grow, especially underground trees, and magma works bring the inherent dangers of fire imps, magma men, and magma crabs.
In more advanced scenarios, emergent behavior comes out of mechanical stuff pretty often, particularly involving minecarts. They can run over dwarves and other creatures, so you can inadvertently be saved by a system that you had intended for a completely different purpose. Moreover, breeding programs of particularly dangerous creatures such as giant tigers can turn out well during a fortress siege. The critters can annihilate entire squads of goblins and leave you wondering why you haven't weaponized them before. Drawbridges intended to serve as actual drawbridges can squash goblins; accidental caveins can leave holes open for your marksdwarves to kill invaders without any personal danger; and the list goes on and on and on. With an incredibly complex game like Dwarf Fortress, emergent behavior shows up everywhere.
Actually, I should probably expand on that last one. In a recent fort, I constructed an aboveground zone for pasturing, butchery, and the like, and roofed it over at one point. I forgot, however, to properly designate floors, and some dwarves tried to build flooring using a bridge for support. It didn't work so well, and two caveins happened. I didn't notice that they left holes until some time later, when my marksdwarves used those holes as ports to snipe at some cave dragons that a goblin siege had brought. The marksdwarves assassinated two cave dragons and mortally wounded a third before I patched the hole in fear that the goblins' marksmen would fire back.