It is because of shadow, you need to give space to cardview to show full shadow. Add android:layout_margin="5dp" to CardView and you will see that the “grey” color is cut shadow.
Solution is adding app:cardUseCompatPadding="true" to CardView and it will give needed spacing.