The simple answer is that water has to be displaced, and/or shoreline eroded for there to be a tsunami.
A major quake on a bad shoreline has the potential of causing the shoreline to slough off enough material that it changes the slope of the shoreline, displaces water and greatly increases the risk of a local tsunami.
Seafloor shifting from a major quake on a seafloor fault has the potential to create a tsunami, depending upon the location of the fault, the type of slippage, how far the plates shifted, the magnitude of the quake, etc.
Here's a very simplified graphic showing a tsunami, Chode.
Excellant example of what displaced water of a tsunami does.
Sure helped me grasp it even after all the education posted on tsunami events.