How is a second measured? And why is it measured that way? The earth's rotation around itself (one rotation around Earth's own axis) doesn't take exactly 24 hours. It off by some seconds which becomes somewhere around 6 hours per year and 1 day in 4 years(leap year), which brings the question why didn't we modify the measurement of 1 second ever so slightly so as to avoid leap years altogether. 
Well how is 1 second measured exactly? Wikipedia says 

the duration of 9,192,631,770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the caesium 133 atom. [1]

Well, why is it measured that way? Is there any technical reason like it is easy to measure and can be standardized easily? Or is it really possible to modify the measurement of time?
 A: Yes, there is a very good reason why one second, our main unit of time, is defined in this way: precision. The most accurate device we have (or we had) to measure time are atomic clocks; if one second were defined as 0.7 of a heartbeat, the precision and constancy of this "one second" would clearly be poorer. Some of the most accurate and available atomic clocks have been based exactly on this transition of caesium. When an atom emits a photon while dropping to a lower energy level, the frequency of the light is always the same.
In these laser-based clocks, one has a beam that periodically oscillates and the oscillations are truly coherent and accurate and one may literally count the periods. The precise number around 9.19 billion was chosen to agree – within the available accuracy – with the previous definitions of one second that was originally defined as 1/86,400 of an average solar day. These days, our clocks – atomic clocks – are able to measure time more accurately and detect irregularities in the motion of the Earth, too. That's why we sometimes have to insert leap seconds etc., too.
If and when more accurate types of clocks are constructed, the definitions will be updated according to these new clocks.
A: For everyday purposes, there are exactly 86,400 seconds in a day (midnight to midnight). But, the rotation of the Earth about its axis and the path of the Earth around the Sun aren't exactly either uniform or stable. The rotation of the Earth is very gradually slowing, and there are a number of factors which make "midday" by solar observation sometimes more, sometimes less than 86,400 seconds from the preceding solar "midday". If you average over a solar year, sure, you'll get very close, but over a number of years, you'll see variation.
For scientific and engineering purposes, the fundamental unit for the measurement of time (the second) must have a fixed definition, not one that gets updated every few years just to keep in step with the occurence of solar midday. So, atomic clocks were developed to provide a stable reference against which the second can be defined once and for all (until or unless it is found that current atomic clocks are not a stable enough reference and there is some other measureable phenomenon which is even more stable).
For what it's worth:
Leap years have nothing to do with the second as a unit of time. Leap years occur because the rotation of Earth about its axis (from which we get our day) and the orbit of Earth around the Sun (from which we get our year) are not related by an integral number, and we want to keep our calendars in alignment with the natural day and year.
Leap seconds occur because we want to divide our mean solar day evenly into hours, minutes, and seconds, and the mean solar day is gradually getting longer (the Earth's rotation is gradually slowing), but we don't want to modify our definition of the second. Leap seconds are added on an "as-needed" basis, which occurs somewhat irregularly because there are a number of factors affecting the Earth's rotation.
A Brief History on Astronomy and the Measurement of Time
Long ago, humans found it beneficial to measure time. The first device to measure time was something like a stick in the ground; as the Sun appeared to move across the sky, the stick cast a moving shadow on the ground. Measuring the position of the shadow became the first measurement of time.
As the need arose for greater precision and accuracy, other devices were invented such as water clocks and eventually pendulum and balance wheel clocks. With the development of electronics, much greater precision, stability, and accuracy could be obtained. For some purposes, even greater precision and stability was required, and so atomic clocks were developed.
As clocks acquired ever improving precision, and the motions of Earth and other celestial bodies were measured to ever finer precision, it was found that Earth actually has many complex motions which affect the observed position of the Sun in the sky. The "first order" motions are the ones we all know - the rotation of the Earth about its axis and orbit of the Earth around the Sun. However, the Earth's orbit is not a perfect circle (it is an ellipse), and the parameters of the ellipse change over time. Also, the axis of Earth's rotation is not fixed - it undergoes a complex set of precessions over time. All of these things combine to make the true length of a solar day and even a year irregular. These variations are measurable with a sufficiently precise clock.
From a human, everyday perspective, the fundamental unit of time is the solar day, which we divide into hours, minutes, and seconds, giving us exactly 86,400 seconds per day. However, a day is not a fixed amount of time, so we have to make a choice about exactly how much time is represented when a clock measures off one second, so an observed solar day is only approximately that number of seconds. For everyday purposes, we accept the approximation and adjust our clocks from time to time to keep them in step with the solar day. For scientific purposes, the second is given a precise definition which approximates the familiar one, but is based on the most stable phenomenon we can usefully measure (such as the state transition of an atom).
A: 
why didn't we modify the measurement of 1 second ever so slightly so as to avoid leap years altogether.

The rotation of earth and the revolution of earth around the sun is not at all synchronized. The Earth really rotates 365.24219647 times during each revolution (in 1992, this ratio changes slightly every year, the tropical year gets roughly a half second shorter each century); so even if we fixed the definition of time to the revolution of earth around sun, we will still need a leap year every 4 years (what we wouldn't need would be leap seconds).
Another reason is because precise time measurement would become incomparable. Since the period of revolution of earth (i.e. the tropical year) isn't constant, if we used the definition of second to exactly match the period of revolution, then whenever you want to specify a precise duration of time, you'll also have to specify which year that definition of second is taken from, and you'll need a table that records the length of second of each year.

Is there any technical reason ... ?

Yes, because with the proper equipment anyone, anytime can take a caesium-133 atom, put it under the specified condition and measure the same second, and it won't have yearly change like the second from earth rotation/revolution would. As far as we know, the frequency of caesium-133 in the 1978 should be the same as the frequency of another caesium-133 in 2049.
