Because some method (only QgsGeometry::set actually) can be deprecated only in python, not in C++. But \deprecated triggers the need for Q_DECL_DEPRECATED