He used state resources and state paid staffers to help write the book on state taxpayer time
How is that legal or ethical?
It isn't, that's why he was ordered to return the money.