contentSize
refers to the size of the content (ie the texture size) whereas boundingBox
also takes into account that the node may be rotated, scaled, skewed.
The bounding box is axis-aligned, which means it forms the rectangle that passes through all 4 corners of the node even when rotated, scaled, skewed, etc. and thus it may be larger than contentSize if any one of these properties has been modified.
However for collision detection of rotated, scaled, skewed, etc nodes the bounding box only provides an "early out" test where not intersecting the bounding box rectangle means there can not be any collision on a more accurate level anyway. If the axis-aligned bounding box intersection test passes you usually go on to perform, for example, an oriented bounding box rectangle intersection test or one where you do a collision mask or polygon intersection test.