Since I don't know exactly where this piece goes in the front end of your car, I will give you some generalities of why this piece is built as it is and why it probably needed to be changed.
The front end of your car has a lot of things going on. Way back when, vehicle front suspensions were setup with a straight axle, somewhat like what rear-ends are setup today, only they had what was called kingpins to allow the front tires to articulate. It may have looked something like this:
In the picture, there are springs which support the axle, then at the outer ends of the axle you see the spindles (the pointy thing sticking out at you). What allows this to articulate is the kingpin. You had to have some type of articulation to allow the wheels to point and this was it. Along with this, there also had to be some way for the input the drive applied to the steering wheel to be translated out to the spindle in order to get the vehicle pointed in the correct direction. For this, you need (obviously) the steering wheel, which gives the initial input. Then you have the steering column which transmits the effort from the steering wheel to the steering box. The steering box changes the direction of effort, as well as reduces the steering ratio so as to make steering the vehicle easier (way back when there wasn't any power steering, other than "arm strong" power steering). On the steering box, there is an arm which is attached to linkages which ultimately goes to connection points on the spindles which causes the front wheels to turn. This long explanation is a general description of the steering. The reason why this is important is because this type of front end does not make for a comfortable ride. It is bouncy and very harsh. It was, however, very tough. It would stand up to a lot of abuse.
This leads us to the part you are showing above. Engineers figured out a way create a two point system which allowed the each front end to articulate independently from each other, giving the occupants of the vehicle a much more enjoyable ride as well as better cornering performance and adjustability. How the did this was by introducing items called ball joints. These ball joints are like what are at the end of your rod. They are very stiff, as in they do not give much deflection, but they do allow for articulation.
Here is a crude representation of an independent front suspension:
The points where it says "upper" and "lower" are where the ball joints are at. If you draw a line through these, this is where the front spindle articulates and replaces the kingpin.
Your piece above helps in this type of endeavor by providing areas of movement or articulation, but do so without deflection (movement is articulated without any give, so is exact). The probable reason your piece needed replaced probably had to do with one or both ends of the rod being worn out ... it has give. This makes it so your steering input is not as accurate, so your vehicle does not track correctly, so you wear your tires out before their time, and so you don't get as good of gas mileage. It can also cause safety issues with your vehicle while driving, as you will not have as great of control of the vehicle.
EDIT: (I realized I did not answer one of your questions)
To check to see if one of these rod ends or ball joints is worn out, depends on where it is at in the suspension system. The first thing to check for are cracked and/or split grease cones (rubber part which protects the joint). If these are bad, it let's moisture and dirt in which quickly wastes the joint away. Tie rod ends (connection at the steering knuckle/spindle) are checked most easily in a two man operation, one sitting at the steering wheel the other looking at the end. Have the person sitting at the wheel turn it slightly (5deg either way is probably enough). The tire should move with the turn of the wheel. If there is deflection at the joint, it is going bad and will soon need replaced. Ball joints are a little more complicated. The easiest and surest way I have seen to check them is to jack one side of the vehicle up at the ball joint of the lower A-arm (second picture) so the tire is about 2-3" off the ground. Get some type of lever (long 2x4) and from the front of the car, place it under the tire with about 5-6" sticking out the other side (toward the back of the vehicle). While applying pressure up slightly on the tire, wiggle the board back and forth while looking for any movement at the ball joint and A-arm assembly. If there is movement, it needs replaced. When I say movement, I mean the knuckle/spindle is moving but the A-arm is not. This is not the only way to check this, but is one of the best/surest ways I have seen to do so.
There are other methods for other joints. If you have a specific joint, I can probably help you with a way to check it.
Hopefully this helps with your understanding of what the piece is, how it works, and why it needed replaced.
From your picture, the link you are showing on your vehicle attaches the body to the front sway bar. As the name implies, the sway bar helps to keep the vehicle from rolling during cornering (keeps it level). It does this by tying the two sides together (both lower A-arms), trying to get them to move together. It acts like a torsion spring in this aspect. This is directly responsible for the stability and safety of the vehicle during driving. The joint on either end of the rod allows the A-arm to move up and down without binding, but it also does this without give. With this part being worn out, it can cause other parts to wear out faster, such as the springs, shocks, tires, and other ball joints. To check this particular part out, you would do three things. First, look at the boots (as mentioned before) to see if they are cracked and abused. This is a precursor to being worn out. It shows there is quite a bit of movement around the joint itself. Secondly, you should just be able to grab the rod and twist it. If this is fairly easy to do, it's probably worn out. Thirdly, if you grab it securely and jerk it back and forth, you should not have any movement at the joints. This is a SURE sign the joint is worn out. You may want to grab it near the joint and try each end separately. On this type of link, if either end is worn out, the whole link needs to be replaced.