It seems as if you are missing words from your question. What causes what at the funeral? Although I can't interpret the meaning of your question, I can give you an overview of the funeral scene.
Huck has hidden the inheritance in the coffin, trying to keep it away from the duke and dauphin. During the service, a dog barks from the basement, and the minister goes off to deal with it. When he returns, he seals the coffin without looking inside, which causes the inheritance money to be buried with Mr. Wilks.