Custom post type and taxonomy cross registration [duplicate]

You don’t need both, one of them is enough. However you need to do it in a order when thing you are adding support to is already registers.

So in first case you need to define CPT before taxonomy and in second case after.

The third way would be to use register_taxonomy_for_object_type() which let’s you do this after both are registered, regardless of order.