clipToPadding basically means "If the view draws beyond its bounds into the padding area, overwrite this drawing with the parent's padding".
The shadow of an elevated view is drawn outside of the view's bounds. In order for it to be visible, you need to make sure that there is space around the view. You can achieve this by setting padding on the parent, but then you need to set clipToPadding=false so that the shadow is not overwritten.
As noted in this answer, this is also useful when you have a scrollable view such as a ListView or RecyclerView. When scrolling the list will draw contents out of its bounds. If you set clipToPadding=false, you'll be able to see that content instead of the padding, and only see the padding when you've completely scrolled up or down.
As an example, let's set an oval shape as background of a view and let's elevate this view. We'll also set some padding on the container. The screenshot below was taken with "Show layout bounds" activated in the Developers options. The area between the two red rectangles is the parent's padding.
This is how it looks with clipToPadding=true, notice how the shadow is clipped at the bottom, where it would lie between the two red rectangles:

With clipToPadding=false, we see the whole shadow:

Here is the XML I used:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:background="#8888ff">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="40dp"
android:paddingRight="40dp"
android:paddingTop="20dp"
android:paddingBottom="20dp"
android:clipToPadding="false"
android:layout_centerInParent="true">
<View
android:layout_width="170dp"
android:layout_height="170dp"
android:background="@drawable/oval"
android:alpha="0.5"
android:elevation="5dp"
/>
</RelativeLayout>
</RelativeLayout>
And here is is the oval drawable:
<shape android:shape="oval">
<solid android:color="#f2f2f2"/>
</shape>