Airlines spend enormous amounts of time and resources planning the schedule. If the airline schedules the flight too aggressively, the flight will more often fail to meet its schedule. On the other hand, if the airline schedules too conservatively to avoid delayed flights, the scheduled duration will be longer, which may make the flight less attractive to travelers and more costly for the airline.
Padding schedules is often necessary for an airline to account for the realities of air travel. Padding has a cost to airlines in terms of high flight crew pay and lower aircraft utilization and for this reason it should not be assumed airlines pad block time "just to look good." Airlines strive to find a balance by add just enough extra blocktime to ensure there is resiliency in their schedules to avoid disruptions that also has a significant cost to the airline. For example operating in ORD is January is very different than operating in ORD in June. A smart airline will add blocktime to account for inclement weather, deicing and airport congestion to avoid the potential and likely delays. Doing so has a cost in terms of flight crew pay and aircraft utilization but the savings will come from reduced disruption cost and of course more favorable customer service.
Careful schedule planning based on good historical data is obviously critical to successful airline operations. For a traveler looking at trip durations (block time) you need to look at performance numbers closely over time. Cirium can be good reference point in this area. The pattern you will see is that shorter block times may seem attractive, but often do not perform well. Conversely, longer block times will tend to provide more time and greater buffer for you when connecting to other flights.