Electronic keyboards can run into a mixer's line input, as they are designed to work into a load impedance that is typical of a line input (often 10k Ohms to 50k Ohms). The pickups in guitars, basses, and acoustic instruments are designed to work into a much higher input impedance (often 250k Ohms to 1 Meg Ohms). Running such a pickup into a line input will cause the pickup's output level and frequency response to be greatly compromised. Similarly, when using a direct box (DI) with such pickups, one should use an active DI such as the Radial Pro48, as active DIs have a much higher input impedance than passive DIs.
Another reason to run keyboards (and computers, too!) through DI boxes is that it isolates and balances the signal for long cable runs. This helps to reduce the noise which can be coupled into the line between the console and the source.
Mike raises an important point, if you are using a short run cable, then an unbalanced line in is ok, if the cable run is longer, then you need to convert it to balanced. There are of course balanced line in connections also, typically used for pro gear interface