Harry finally used the liquid luck. His goal was to get certain memories from Slughorn that involved a young Voldemort and something with immortality and in this case, Hermione could condone the use of the potion. At least he wasn’t using it to get an advantage in his NEWTs or to pass his apparation test.