“Set a course for Starbase 9, Warp six. Engage!” - Captain Jean Luc Picard
Watching Star Trek: The Next Generation (1987), one naturally wonders about the logistics of the scientific procedures performed by the crew. The show is largely theoretical, and theory encourages inquiry. One big question people tend to have when watching TNG is how Captain Picard (Patrick Stewart), or whomever is giving the order, decides which warp speed to use.
Galaxy class starships like the Enterprise-D have a maximum warp speed of 9.8, which is more of a theoretically achievable rate that would put the ship at risk. Warp 9.6 is the fastest speed the ship can maintain for a sustained amount of time under regular operation, but it can only hold that velocity for a few hours. Warp 5 - 6 is the ship’s standard cruising speed, while 8.2 is the maximum sustainable speed for longer amounts of time without overly detrimental effects.
All this leads to wonder about how they decide which speed to use. Picard occasionally asks the android Data (Brent Spiner) for a quick calculation to determine speed but more often throws out a velocity off the cuff.
The real deal is that higher warp speeds lead to higher energy consumption. Even in the 24th century with the advanced technology behind the ship’s warp engine, the energy source is not infinitely renewable. Deuterium and antideuterium are required to power the matter/antimatter reaction that powers the ship's warp engine. Stored in tanks, these fuels are replenished at Starbases, but during voyages the crew is limited to what they have on hand. There’s also an element of wear and tear on the ship’s mechanics. It may be a highly advanced 24th-century vessel, but it’s still constructed of physical materials that wear out as strain is put on the ship over time.
This is evidenced by Captain Picard’s log in Season 6, Episode 20, “The Chase,” in which he notes, "Our frequent use of high warp over the last few days has overextended the propulsion systems. We are finishing minor repairs before returning to Federation space."
All that being true, the Captain must weigh the urgency of the voyage against the wear on the ship. If it’s routine travel, he can choose a warp speed that doesn’t put a heavy load on the vessel. If it’s an emergency, he may employ Warp 9 or greater, getting there more quickly but creating the need for earlier repairs and maintenance and opening up the ship to increased risk.
Additionally, in Season 7, Episode 9, “Force of Nature,” we learn that warp speeds harm the structure of subspace, similar to the eventual wear from repeatedly running over a carpet. Therefore, it's only ethical to cause this damage when it's absolutely necessary.