These behaviors were selected precisely because they constitute observable and measurable practices of an orthodox form of Islam, as opposed to internalized, non-observable articles of faith.
Around that time Mrs Erdogan, friends say, converted from Shafi'ism (an orthodox version of Sunni Islam which forbids all physical contact between men and women unless they are married) to the more liberal Hanafi school, followed by most Turks, so she could shake hands with men and non-Muslim women.