Government grants typically happen in two ways.
The first way is for the applicant themselves to become aware of a grant opportunity and to submit an application on their own. Usually, they already have a project in mind (such as a video surveillance upgrade), and may have already received a proposal from a vendor in order to determine the cost. If the grant is approved, the applicant is usually required to go through a competitive bid process to actually select a vendor. But as in many competitive bid situations, they may already have a vendor they like (perhaps the one who submitted the original proposal) and may slant the evaluation process to favor this vendor.
The second way is for a vendor to approach an applicant cold to make them aware of a problem that they didn't know that they had and propose a solution to this problem that could be funded by a grant. Not coincidently, this solution is sold by the vendor who brought the problem to their attention in the first place. The vendor then walks them through the grant application process and may even prepare the specification that is used for the procurement. If the grant is approved, a competitive bid process must be used, but in almost every case, the vendor who initiated the project has a significant edge and usually wins.
Companies who do most of their business in the government sector are usually experts in "grantsmanship" and devote significant resources to lobbying for grants, identifying grant opportunities, and helping prospective clients to obtain grants. If you are a novice in this area and try to compete for this type of work, you will usually get crushed like a bug.