Bedford has been the beneficiary of $7.75 million in MassWorks infrastructure grants over the past five years.