Why does hair grow after trimming but remains at a constant length after a while?
Hair grows from the follicle; there is no way for the follicle to determine if the hair tip is trimmed or not. This is unlike plant shoot/root growth that happens at the tip. Also there is no signaling from tip to follicle. 

Hair growth has four stages: Anagen (Initiation), Catagen, Telogen (resting) and Exogen (falling off). Initially the primary follicle is formed during development of the skin, after that the hair growth continues in a cycle. In other words the old hair shaft is replaced by a new one. The period of the cycle (or how fast it happens determines the final hair length); the faster is the cycle the shorter will be the hair (you may note that certain people have a very short head hair even when they do not trim). This is because the old shaft doesn't get time to grow before it is shed and replaced by the new one.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 

From: Stenn &amp; Paus (2001)

From the same source


  Because there is a limit to the time a follicle stays in anagen, there
  is also a limit to the length of its product, the hair shaft. The
  anagen phase has been divided into six subphases (64, 359). Except for
  the last subphase, anagen VI (the duration of which dictates the shaft
  length), the length of the anagen subphases I–V does not differ
  substantially between follicles from different regions (490, 565). 
  […]
   Because the actual length of a hair follicle does not appear to
  dictate the length of its shaft (rather the duration of anagen
  determines hair shaft length), it is tempting to speculate that the
  subcutis offers optimal growth conditions…
  […]Although influenced by environment (light, temperature, and
  nutrition) and systemic (endocrinological factors) parameters, it is
  generally believed that there is considerable innate local control of
  hair shedding; each fiber grows to a specific length, for a specific
  period of time, before being shed