Mongoid assigns object ids to all documents, including embedded ones, which very often is simply not needed and just wastes disk space. And it’s annoying by the way.
There’s fix for this coming (https://github.com/mongoid/mongoid/pull/644) by introducing Mongoid.embedded_object_id
configuration directive.
For now you can simply overwrite identity
method.