When I first learned various states hold elections for state cabinet positions I was puzzled, because there are no such elections for federal secretaries. Why do so many states do it like this, instead of having them appointed by governor? Doesn't it create incohesion when there are different secretaries from different parties in the state governments? I couldn't find any answer to this online.
Why do states do it like this, instead of having them appointed by governor?
The intent is to weaken the power of the governor, compared to the power of the President of the United States.
Several states have their lieutenant governors elected separately by the people rather than as a joint governor / lieutenant governor ticket. Several states have key statewide executive positions elected separately by the people rather than appointed by the governor. Several states have elected rather than appointed judges.
An extreme example is Texas, where the lieutenant governor arguably has more power than does the governor. Unlike the President of the United States, the Governor of Texas does not appoint judges, does not appoint key executive positions, and except for legislative veto, has no authority over the state budget. Unlike the Vice President of the United States, the Lieutenant Governor of Texas has rather broad authority over the budget and has significant authority over the Texas State Senate, including setting the legislative agenda. Neither has authority over key executive positions or judges because these are independent elected positions.