As it is really beneficial for all organisms, why are animals, especially mammals (I don't know about other vertebrates) unable to synthesize cellulase enzyme in their body? Is it linked to some DNA defects or have we not evolved from cellulase producing bacteria?
The answer to questions like this is just a guess (Primarily Opinion Based), and I've voted to close. But some food for thought too long for a comment:
As it is really beneficial for all organisms...
Why do you think that cellulase is so very beneficial to mammals? Animals did have cellulase (some ancient invertebrates still do, like sea squirts, abalone; crayfish have it); we may well have faulty copies of the gene (as @AMR suggested in comments.) But you presume to know we'd be better off with it. That's a belief without any objective evidence.
What might happen if we could convert cellulose into sugar? This is also important to think about. If some of that surfeit glucose in out guts were fermented into alcohol (this condition does rarely occur in humans, and the living people afflicted with this are truly afflicted), because we have a gut microbiome, we would walk around drunk much of the time (ok, maybe even only some of the time), which would make escaping predators less drunk than we were difficult. Maybe the body would be incapable of handling that level of glucose ingestion, and we'd all be T2 diabetics by the time we were just out of toddlerhood.
Humans need fiber in our GI tracts. I don't know all the reasons why we developed that way, but we do. Cellulase would do away with that. Do you know for sure that this would be good for us?
The thing is, you've made an assumption (we'd all be better off with cellulase) that has no evidence to support it at all (or, at least you have not provided any.)
It's always tricky to assume that you know what's more beneficial for a mammal in the presence of billions of mammals that seem to be doing OK. There are millions of reasons that they are doing OK. We don't know all of them, but the absence of the very thing you presume would be a benefit may be what allowed vertebrates to develop at all.