We usually board the plane before going through the security check
People are not allowed to carry dangerous goods on board
The security check makes sure people will not carry dangerous goods when boarding
In some countries, people have to go through security checks before they get on the subway