This isn't entirely true. Authors try to publish in Nature not just because of its prestige, but also because it provides a wider audience. If you have a strong result that you think would be interesting to a wider audience, then publishing in Nature or Science, rather than a specialized journal, makes sense.
Additionally, these journals really do provide more services than most specialized journals. In particular, the editorial service at Nature or Science is of much higher quality than your typical specialized journal. The editing includes editing the text for language and clarity, typesetting, and commissioning third-party high-level summaries (Nature's "News and Views" section). In contrast, at least in computer science and mathematics, most journals do minimal, if any, editing. The editors of prestigious journals do add value, and this helps to maintain the journals' relatively broad audiences.
Additionally, these journals really do provide more services than most specialized journals. In particular, the editorial service at Nature or Science is of much higher quality than your typical specialized journal. The editing includes editing the text for language and clarity, typesetting, and commissioning third-party high-level summaries (Nature's "News and Views" section). In contrast, at least in computer science and mathematics, most journals do minimal, if any, editing. The editors of prestigious journals do add value, and this helps to maintain the journals' relatively broad audiences.