Basically, there are 2 reasons to "swing" the tune. The first reason applies to music in general, and I will call it "swinging for lift". The second reason is more specific to the diatonic button box and I will call it "swinging for basses"
This is really a pretty basic thing. Playing everything at a regular rhythm get boring, sometimes the tune just seems to plod along. Adding some variation to the note durations adds more interest, energy, lift to the music. It jazzes the music up, and can be considered a mild form of variation or improvisation. It helps get the toes tapping and heads nodding.
Swinging can be very subtle and there are many ways to go about it. Above we talked about a dotted quarter note - eighth note combination. That's pretty obvious. But it could be much more subtle; how about a quarter note tied to a sixteenth note followed by a dotted eighth note? Much more subtle. Or how about a quarter note - sixteenth rest - dotted eighth note? Again, more subtle, but also less smooth and more stacatto sounding. But we are still playing the same total duration. Or it can get stranger and more obvious. How about an eighth note - dotted quarter note? This will sound even more syncopated because the emphasized note, the first note in the measure, is played shorter, which deemphasizes it. More emphasis goes to the off beat (it feels unnatural to the musician, and takes quite a bit of practice to get the hang of).
Let's explore that last variation a bit more. That last variation gets really interesting when viewed in the context of dancing. In most dancing the strong beat is considered a down beat. In other words, the dancers bend their knees (thus the body goes down, lower to the ground) and push off from the floor on the strong beat. On the off beat, or weak beat, the dancers straighten their knees and their weight is more or less suspended in air (rise and fall) for a short duration. The body generally moves up during this time. All this is timed so that the dancer is down again in time for the next down beat. This is an almost involuntary reaction to the music. (Let me just point out that it is not neccessarily so in all cultures - many Balkan dancers lift on the strong beat for example).
With our last swinging variation, we have shortened the strong beat and lengthened the off beat. Stated another way, we have shortened the down beat and lengthened the up beat. How is a good dancer going to react to this? In order to keep to the timing of the music, the dancer is going to spend less time going down and more time being up. In other words, his knees will bend more quickly and he will push off from the floor more powerfully in order to be suspended for a longer time (the higher you jump, the longer it takes to go up and come down, because the acceleration due to gravity is constant on Earth). This is where the term "lift" comes in. It appears that the dancers are "lifted" off the ground because they are spending less time with their full weight supported by the floor.
There are limits to how much of this can be done. The limits are the fitness of the dancers and the speed of the music. A dancer can only jump as high as he or she can jump, and that's only going to take a set amount of time. Any up beat of longer duration than that jump is going to be too long, because the dancer will then have to stand around waiting for the next down beat. As the dance goes on, fatigue sets in and that maximum jump gets smaller and smaller. Generally speaking, you want to pace the music so that the dancers are expending energy at a sustainable rate, so that the dance doesn't need to slow down as it goes on, or even worse, dancers start to drop out because they can't keep up. The pacing comes with experience. An experienced dance musician can watch the dancers and tell if the lift is just right. Also, as the tempo of the music increases, there is less and less time for the whole down-up motion. The dancers compensate for this by jumping more quickly - which translates to not so high.
To a dancer, whose body is conditioned to respond to musical stimuli, music which emphasizes the up-beat feels lighter and more energetic, while music that emphasizes the down-beat feels heavy and solid. Some music and some dances are meant to feel heavy, others are not. Swinging the tune is a technique that can be used to make light, energetic dances feel lighter and more energetic.
As opposed to "swinging for lift", swinging for basses is specific to button accordions. As we know, not every bass chord can be played against every treble note, because both are controlled by bellows direction. Sometimes, the bass chord that you are after is in the wrong bellows direction for the treble note you need to play. At times like those, swinging the melody to allow the bass to fit in is sometimes an option.
Let's set up an example. In this example, we want to play 1 measure of 4 quarter notes ABAB and we want to play them against an A bass and chord. This instrument plays A on the pull and B on the push in the treble and the pull A bass has an E bass on the push. There is no other A bass available. If we play it as 4 straight quarter notes, the basses will come out AeAe, we have no choice, but its not what we want.
However, if we swing the tune to be dotted quarter-eighth-dotted quarter-eighth, we can now play the basses we want, because the melody note is pulled while all the basses are being played, and no basses are being played during the push Bs. This is assuming that you are playing light and snappy basses, say eighth notes at the maximum. The technique wouldn't work as well for held or droned basses.
This is a very useful and simple technique for fitting the "proper" basses to the melody without changing the pitch of the melody notes - just the duration. As a side effect, swing is added to the melody, which is often a good thing (though it can be over done).