Synonymous codons, i.e., DNA nucleotide triplets coding for the same amino acid, are used differently across the variety of living organisms. The biological meaning of this phenomenon, known as codon usage bias, is still controversial. In order to shed light on this point, we propose a new codon bias index, CompAI, that is based on the competition between cognate and near-cognate tRNAs during translation, without being tuned to the usage bias of highly expressed genes. We perform a genome-wide evaluation of codon bias for E.coli, comparing CompAI with other widely used indices: tAI, CAI, and Nc. We show that CompAI and tAI capture similar information by being positively correlated with gene conservation, measured by the Evolutionary Retention Index (ERI), and essentiality, whereas, CAI and Nc appear to be less sensitive to evolutionary-functional parameters. Notably, the rate of variation of tAI and CompAI with ERI allows to obtain sets of genes that consistently belong to specific clusters of orthologous genes (COGs). We also investigate the correlation of codon bias at the genomic level with the network features of protein-protein interactions in E.coli. We find that the most densely connected communities of the network share a similar level of codon bias (as measured by CompAI and tAI). Conversely, a small difference in codon bias between two genes is, statistically, a prerequisite for the corresponding proteins to interact. Importantly, among all codon bias indices, CompAI turns out to have the most coherent distribution over the communities of the interactome, pointing to the significance of competition among cognate and near-cognate tRNAs for explaining codon usage adaptation. Notably, CompAI may potentially correlate with translation speed measurements, by accounting for the specific delay induced by wobble-pairing between codons and anticodons.