If they can give that amount why not, they are a rich state and they think that it will have an increase in vaccination, five million dollars is a huge amount of money and it's very tempting but if a guy made up his mind and it's against his will to get vaccinated, I don't think that $1 million dollar lottery can compel him to get vaccinated, there are people who are afraid of needle and they need consultation from a physical to overcome this fear.
Whether the state is wealthy or not, I don't think taxpayers (everyone) are thrilled with such spending. And even though most people are reasonable (we will assume that this is so), there are people who, in pursuit of a ghostly chance to win a prize, will make decisions that they would not have made without this option.