Acts 21
21 They have been informed that you teach all the Jews who live among the Gentiles to turn away from Moses, telling them not to circumcise their children or live according to our customs. 22 What shall we do? They will certainly hear that you have come, 23 so do what we tell you.
Basically the scheme to have Paul participate with the offering of a sacrifice in the temple was designed to placate the believers who were angry at him for preaching against the law.
Actually, that was a ruse created by those who were against Paul.
22 What is it therefore? the multitude must needs come together: for they will hear that thou art come.
23 Do therefore this that we say to thee: We have four men which have a vow on them;
24 Them take, and purify thyself with them, and be at charges with them, that they may shave their heads: and all may know that those things, whereof they were informed concerning thee, are nothing; but that thou thyself also walkest orderly, and keepest the law.
25 As touching the Gentiles which believe, we have written and concluded that they observe no such thing, save only that they keep themselves from things offered to idols, and from blood, and from strangled, and from fornication.