Attics are often where you run your mechanical and electrical equipment. It is also more cost prohibitive to build flat bottom chord roof trusses with the ceiling applied directly to the underside of the bottom chord. This leaves a lot of space, which becomes the attic.
More and more contemporary homes are moving towards exposing the structure of the roof and the "guts" of the building, leading to higher ceilings and less attic space. This is often more expensive because the structure has to be a finished product, versus rough cut lumber.
TL;DR, attics exist in most homes due to ease of construction, cost savings, and general best practices.