Why do some substances ionize instead of dissolving in water?
Dissolution is simply the mixing of two phases to produce a single homogeneous phase. Ionization is a process by which a substance with no net charge is converted into one or more ions. It includes the mundane example of dissolving an ionic compound in water that dissociates into its constituent ions as well as things like forming ions by knocking electrons off with an electron beam. They're both surprisingly complex topics, but I think the question can be answered conceptually by considering a few compounds: $\ce{NaCl}$ , acetic acid ($\ce{CH3COOH}$), and glucose: 

(source)

All dissolve readily in water, but only two of them are electrolytes. As you note, $\ce{NaCl}$ is composed of ions and breaks apart into $\ce{Na+}$ and $\ce{Cl-}$ in solution. An electrolyte is any compound that ionizes when dissolved in a given solution, so $\ce{NaCl}$ is an electrolyte in water. Moreover, because there's is no way for a salt to be dissolved without ionizing in water (i.e. $\ce{NaCl_{(aq)}}$ isn't possible), $\ce{NaCl}$ is known as a strong electrolyte as when it dissolves, it ionizes completely.

$\ce{CH3COOH}$ also dissolves readily in water, but isn't an ionic compound. Because it's a weak acid, it exists in this equilibrium in solution:
$$\ce{CH3COOH_{(aq)} + H2O &lt;=&gt; CH3COO^{-}_{(aq)} + H3O+}$$

Because it can lose a proton to form ions, it does ionize in solution and is thus an electrolyte, but because it's a weak acid, the reaction doesn't go to completion and some $\ce{CH3COOH_{(aq)}}$ exists in solution making acetic acid a weak electrolyte as it doesn't completely ionize in solution.

Finally, glucose readily dissolves in acid, but none of its protons are readily lost so it doesn't ionize at all meaning that it isn't an electrolyte in water. Without getting too much into the thermodynamics of dissolution, the reason glucose is so soluble is because the many hydroxyl groups allow it to hydrogen bond extensively with water, where the equivalent compound without them, hexanal, is only slightly soluble due to the polar carbonyl group, and hexane is essentially insoluble.