Think about a "thin" beam, for example a strip of springy steel. It is very easy to bend the strip into a curve, compared with stretching or compressing it along its length.
When it is bent into a curve, the length of the strip measured around the curve does not change significantly, and that means the straight-line distance between the two ends becomes smaller.
If you try this experimentally with something you can bend easily with your hands, you will find that a graph of the force against distance between the two ends is not a straight line - the effective stiffness reduces as the load increases and the beam curves more.
On the other hand, the stiffness when compressing the beam along its length without bending it is constant (and equal to $EA/L$, as shown in any strength of materials textbook).
Since it is impossible to make a perfectly straight beam in the real world, the beam will buckle when the end load reaches the point where the stiffness in "bending sideways" becomes less than the stiffness in "perfect compression".
Euler's formula gives a fairly good approximation to that load, though it makes a few more assumptions (for example, about the shape of the beam when it bends sideways) which are not completely accurate. But since the tolerances in the beam geometry are also unknown, Euler's formula is good enough to be useful in practice, even though it usually over-estimates the actual buckling load by a factor of a few times (say between 2 and 5 times) compared with real life.
Because the beam becomes more flexible after it buckles, if you apply a constant end load (e.g. the weight of something pressing on the end of the column) the buckling results in catastrophic failure, as the beam curves more and more until it breaks. On the other hand, if you apply a controlled displacement to the end, the process is reversible and when the load is removed the beam will return to its (nominally) straight shape, with no permanent damage.