Fibre is carbohydrate your body cannot break down. It reaches the gut intact, never becomes glucose, and so never triggers the insulin response that ends ketosis. Counting it against your daily limit means throwing away allowance you never spent.
That is why a cup of raw spinach reads as 1g total but effectively costs you nothing, while a slice of bread reads similarly and costs you most of a keto day. Same number on the front, different number where it matters.