If flies went extinct it would cause problems across the world with decaying organic matter. While bacteria and other insects will also consume decaying matter, flies do it much more quickly.