on possibly infinite representations
I once had this same question, so the following is the way I came to understand it.
There are many ways of defining a function. A piece-wise definition (like for your square wave) or a single succinct formula that may include logarithms, polynomials, or anything else we might like to throw at it. Or we might only have some Differential Equations which can be used to generate the function.
However, just because we can specify functions like that doesn't mean we can do much with them. Different mathematical tools or manipulations require different representations. In particular integration is often intractable for many arbitrary functions.
Common formats that give us access to common "Toolkits" are an (often infinite) list of coordinates, an (often infinite degree) polynomial, and (often infinite) combinations of sines and cosines. That all of these representations may be infinite does not mean that they are not useful, as there are often shorter ways expressing them (Sigma notation is common for infinite Taylor series), or hopeful they "converge" so a finite estimate gives us enough information about the part of the function we are interested in.
The Fourier Transform
I'm not an expert on the Fourier Transform (I've only ever studied Discrete FT, so others feel free to change or add) but they have strengths and weaknesses just like other representations. An obvious strength is that differentiation of sine waves is easy: simply multiply the amplitude of each wave by its frequency.
In your example, the infinite series of sines and cosines that represent a square wave can be simply expressed as $\frac{sin(\pi t)}{\pi t}$ (think of it like that formula gives the amplitude of the sine wave at frequency $t$). It also converges (high frequencies contribute much less to the sum). Once you have it in this form, all of the tools developed for Fourier series are at your disposal.
You can do signal processing on it. What will your square wave look like after it has gone through filters, or after it has been realised as an analogue waveform? If it is a sound wave, what harmonics will people hear? How will it be encoded into an MP3?
Is your square wave part of a control system? How will it interact with other components in the system?
Is your square wave part of a Differential Equation? You can now use Fourier methods to solve it algebraically.
If you want an example of how insanely flexible Fourier transforms are, look up the "Ptolemy and Homer Simpson" YouTube video. Now we can integrate Homer!
Here is a page which goes into more detail about the Fourier transform with some interesting visualisations:
http://nautil.us/blog/the-math-trick-behind-mp3s-jpegs-and-homer-simpsons-face