Registering required RPs from template metadata (1588437, 2002449)

Why is this chunk of code here, it seems unrelated to the work items at hand?