I am wondering why some tactile switches have 4 terminals instead of two? For example, take a look at these switches, like the image below:


(source: pranelectronics.com)  

What is the use of the two remaining pins? If the pins of the exact opposite side are always shorted then why don't they have just 2 pins?

I'm going to put David Tweed's comment into an answer, which it deserves. 

The dual shorted pins allow inexpensive single-sided boards to be used for X-Y matrices of switches without requiring jumpers. 

Here (from an NKK datasheet) are a couple examples of such layouts: 

X-Y matrix (This would typically be scanned by a microcontroller or ASIC):



Common line (one side of each switch common, typically it might be connected to Vss or Vdd and a pullup or pulldown resistor (perhaps internal to a chip) would be required for each switch. 


