The rest of Acts chapter 5 recounts another instance of Apostles vs. Religious leaders, like in chapter 4. Again the apostles tell them that they (the apostles) must obey God rather than men (verse 29). Then in verse 41 the apostles are rejoicing because they have been regarded as worthy to suffer. The council had very publicly arrested them, and beat them before releasing them.
The followers of Jesus knew that following God was likely to bring hardship to themselves, especially since they had witnessed the same treatment had been given to Jesus.