because the ions doesn't have the same size. it depends on hydratation of the ion, so although Na+ atom is smaller than K+, Na+ has bigger hydratation cover. So Na+ just doesn't fit in K+ ion channels. more, there are amino acid residues in every channel that are specific for recognizing only the size of ion that is typical for.
although this doesn't mean that K+ can't go through the Na+ channel. It can, but there's much lower affinity.