Why The (Ridiculously Confusing) Hybrid System Exists
Up until about 30 years ago, Texas was a strong Democratic state, and presidential caucuses--the preferred system prior to 1976--were little more than local turf wars between the liberal and the conservative wings of the party establishment. According to Dr. Patrick Cox, Associate Director for Congressional and Political History at the University of Texas, prior to the 1970s, the Texas Democrats used the "unit rule," meaning that all delegates--often under the guidance of the governor--supported one candidate at the national convention. From about 1950 until the mid-'70s, the conservative wing dominated, most notably in the persons of governors R. Allan Shivers and John Connally, Jr.
But in the lead-up to the 1976 presidential nominations, conservative Democrats were concerned that the liberal faction was better organized--and that this would hurt the presidential aspirations of one of their own, then-senator Lloyd Bentsen. They made a forceful push for a primary, which they believed would give an edge to the more popular candidate, instead of the one with the best organization. Unable to roll the liberal wing of the party, the conservatives eventually settled on a compromise, where two-thirds of the pledged delegates (126 total) are decided by primary, and the remaining one-third (67) are decided in caucus. (Bentsen lost to Jimmy Carter anyway.)
Read the whole post for a good summary of further aspects of the primary/caucus system.