It appears that the grouped objects will be placed in the
layer that is higher in the stack. If you later ungroup the
objects, both objects will remain in the higher layer - they will
not return to their original layers.
Object A is in Layer 1 and Object B is in Layer 3. Select and
group Objects A and B, and the grouped objects will be placed in
Layer 3 (which is higher in the stack.) If you then ungroup these
objects, both of them will be placed in Layer 3.