Why do these two IUPAC naming examples not begin numbering the chain closest to the alkyne?
The oversimplified statement “The chain is numbered from the end closest to the triple bond.” applies to simple alkynes with one triple bond. It is not necessarily correct for compounds that include several multiple bonds or other characteristic groups.

According to the current version of Nomenclature of Organic Chemistry – IUPAC Recommendations and Preferred Names 2013 (Blue Book), low locants are assigned first to the principal characteristic group that is expressed as a suffix and then to multiple bonds.


  P-14.4 NUMBERING
  
  When several structural features appear in cyclic and acyclic compounds, low locants are assigned to them in the following decreasing order of seniority:
  
  (…)
  
  (c) principal characteristic groups and free valences (suffixes);
  
  (…)
  
  (e) saturation/unsaturation:
  
  (i) low locants are given to hydro/dehydro prefixes (…) and ‘ene’ and ‘yne’ endings;
  
  (ii) low locants are given first to multiple bonds as a set and then to double bonds (…);
  
  (…)


Therefore, the correct name for the second example given in the question is ‘but-3-yn-2-ol’ (not ‘but-1-yn-3-ol’) since a low locant is given first to the suffix ‘-ol’.



If the compound contains several multiple bonds (double or triple bonds), low locants are given to multiple bonds as a set. If there is still a choice, low locants are given to the double bonds.


  P-31.1.1.1 The presence of one or more double or triple bonds in an otherwise saturated parent hydride (…) is denoted by changing the ending ‘ane’ of the name of a saturated parent hydride to ‘ene’ or ‘yne’. Locants as low as possible are given to multiple bonds as a set, even though this may at times give ‘yne’ endings lower locants than ‘ene’ endings. If a choice remains, preference for low locants is given to the double bonds. In names, the ending ‘ene’ always precedes ‘yne’, with elision of the final letter ‘e’ in ‘ene’. Only the lower locant for a multiple bond is cited, except when the numerical difference between the two locants is greater than one, in which case the higher locant is enclosed in parentheses.
  
  (…)


Therefore, the correct name for the first example given in the question is ‘2-methylpent-1-en-3-yne’ (not ‘4-methylpent-4-en-2-yne’) since the locant set ‘1,3’ for the multiple bonds is lower than ‘2,4’.