This has been the protocol for quite some time. Before these gates were installed, flight attendants would use galley carts to block the passageway to the cockpit. These gates don't appear to be on all aircraft types, so galley carts are still used on those (777 for example).