Key shortening for hmac sha256
From the HMAC-RFC 2104, section 3
(B = blocksize, L = hash output length):  


  The key for HMAC can be of any length (keys longer than B bytes are
  first hashed using H).  However, less than L bytes is strongly
  discouraged as it would decrease the security strength of the
  function.  Keys longer than L bytes are acceptable but the extra
  length would not significantly increase the function strength. (A
  longer key may be advisable if the randomness of the key is considered
  weak.)  


Tldr, unlike you, they don't consider a longer key to be more secure.