The principle of expediency in the mechanism of implementation of legal responsibility