Kids naturally enjoy yanking levers, flipping switches, and pushing buttons or pedals
Yes, they do. AND sometimes they do know more about what they are doing than you think they do. I knew a child who, at age 3 (three) opened the large heavy door of a 79 LTD II Ford, got behind the wheel, turned the keys ON, AND put the gearshift in Drive. He then "drove" his grandfather's car as it rolled downhill. I honestly think he would have made the turn if he had actually started the engine so the power steering would have been on. Fortunately the car stuck in soft dirt, and there were no injuries.
At 2 years old, I don't think the child was beyond the "I'm curious, I grab" stage, but very soon after, they are aware of more than we think. Understanding the whys, and why nots of things takes more maturity, and usually follows after the physical ability to do something is possible.
They watch us, see us do things, and they LEARN. Children seldom understand the full reasoning of things, but watching us teaches them how to do tasks. How soon a child can actually do the task depends, of course, on many things, but don't think a child who has seen it done (perhaps often) doesn't know what to do. Some really do.
Some children are truly exceptional, at ages you might scoff at. One four year old, who's dad had a complex component stereo, which sat on a shelf 6ft off the floor (to be kid safe). Amp, preamp, tuner, turntable, tape deck, equalizer, etc, and set up so it needed a series of switches in just the right positions for each operation. (not one touch button operation). When a visitor asked how to turn on the radio (when dad was out of the room) the little girl, playing on the floor, without even looing at the stereo gave step by step instructions on which switch had to be where to get what. She had never done it, didn't seem interested in doing it, but she knew HOW to do it. Never was taught, only watched her Dad do it. A lot.
A five year old got a .22 rifle out of a closet. Got the BOLT for the .22 out of a dresser drawer, and stacked up things until he got the box of ammo from a high shelf. Got the bolt in the gun, and a shell in the chamber. Then fired it in the house, fortunately only putting a hole in the floor.
I mention these example only to illustrate some things children have done that I have personal knowledge of, and to show that just because you don't think they might be able to do it, doesn't mean they can't.
The important point is that in any and all of these children & gun tragedies it is always some failure on the part of the adult that creates the condition for it to happen.