QUESTION: Why don't all electrons possess max kinetic energy when they are freed from a metallic surface?
ANSWER: The kinetic energy of the emitted electron is equal to the difference between the energy of the incoming photon that liberated the electron and the work function of the surface. For example, if the incoming light contains 15 eV of energy and the work function of the surface is -10 eV the liberated electron will have 5 eV of energy. Energy is conserved.
---------- FOLLOW-UP ----------
QUESTION: I know that, but your explanation made another question pop into our discussion which is , is E=hf the energy of the photon to free only the electrons on the outside orbit of an atom, by this I mean will it still be valid for inner orbital electrons or Will E change to E=2hf or 3hf .. Etc ?
The outermost electrons act to shield the inner electrons. After all, the incoming light will first encounter the outermost valence electrons first. In any case the inner electrons have MUCH higher ionization energies and only VERY energetic light would be able to liberate these inner electrons. Not impossible, but unlikely.