Issue numbers in each commit can also help when you end up cherry-picking commits from one branch to another.
The alternative in your case (leaving it as-is, with an issue number) implies that the entire commit addresses that particular issue number, which may not be true. (It may be part of a series of commits for that issue)