Both a HSA and a 401(k) are for tax-advantaged savings—the former for health expenses only, and the latter for retirement.
It happens to a lot of people: You leave a job with every intention of rolling over your 401(k), but then you get busy with the next thing in your life and that account doesn’t seem so important ...