Bearing flats help reduce the friction when an axle or drive shaft turns in the metal square holes. Many teams use screws and nuts rather than pop rivets to keep the bearing flats fixed to the metal.
Students often try to use shaft collars to keep gears and wheels in place. However, they often come loose, and the gears or wheels move around on the axle or drive shaft. So instead, use spacers to keep gears and wheels where you want them.
The axles and drive shafts need to go through two pieces of metal, not just one. See the Chassis page to learn more.
When you add the bearing flats, motors, and axles to the chassis, it usually ends up being bigger than expected. To accommodate for this, design your chassis to be smaller than the 18" x 18" requirement, and you will not need to deal with rebuilding or being disqualified at a competition.