From some quick observations, it seems to pick the first tag (ordered by populatiry, descending) that isn't already in the title. If all the tags are in the title, it won't prepend anything.
All the GIMP questions tagged only with gimp, seem to have some form of "gimp" in their title. Which makes sense if you're asking a question about GIMP.
Using Data.SE, I found an example where GIMP isn't in the title and gimp is the only tag. The tag is copied up into the title. Along with numerous other examples (that are far easier to find) this seems to prove my hypothesis.