This often happens when the time or expense entries are marked as billable manually, overriding your project settings. It can also occur if your Time & Expenses settings in Global Settings aren't enabled to evaluate against a project's contract amount. Check out this Core Help article on time entry evaluation.