Most suspension parts are held together by nut and bolt combinations, but there are a few that are just a nut on a stud, usually ball joints and outer tie rod ends. To make sure the nut can’t come loose, the stud has a hole through it for a cotter pin to go through. Some nuts also have a slot in them to make sure they can’t move at all.
Someone had the idea to replace their cotter pin with a second nut, because two nuts will lock together. It looks like the first nut is a self-locking nut as well. They probably had to do this when they had to remove the tie rod and the cotter pin broke off inside the stud, as often happens with how rusty things get up here, and so instead of removing the remains of the pin, just put a second nut on.
Here in New York we often joke that we don’t even need to put cotter pins in, because after one winter it will all just be one solid piece of rust. I don’t recommend doing this, because if these things come apart, you will crash. My car doesn’t even have cotter pins on either tie rod, but there’s no way they’re coming apart without an impact gun.