Why is the evaluation of the move h5 dependent on position of the bishop? [FEN ""]
[startply "50"]

1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Ba4 Nf6 5. O-O b5 6. Bb3 Be7 7. Re1 d6 8. c3 O-O 9. h3 Na5 10. Bc2 c5 11. d4 Qc7 12. Nbd2 Nc6 13. d5 Nd8 14. a4 Ra7 15. Nf1 g6 16. Bh6 Re8 17. Ng3 Nd7 18. Nh2 f6 19. Be3 Nb6 20. axb5 axb5 21. Bd3 Bd7 22. Qd2 Nf7 23. Rxa7 Qxa7 24. Qe2 Qa6 25. Ng4 Kg7 26. Bc1 Na4 27. Bc2 Ra8 28. Qe3 c4 29. Rf1 Nc5 30. Nh6 Ng5 31. f4 exf4 32. Qxf4 Bxh3 33. Qh4 Bd7 34. e5 dxe5 35. Nh5 gxh5 36. Qxg5 fxg5 37. Rf7 Kxh6 38. Rxh7#


I have two questions.

1) Why was a4 played?

2) According to chess.com engine, after 26. Bd2, h5 is best, but after 26. Bc1 h5 is good. Why is that so?
...h5 is indeed good because it kicks the knight away from its current position (where it's a very dangerous piece)