Create dmg file on macOS 10.14 that can be opened on macOS 10.11
If the source folder is in a APFS volume, then by default a APFS volume will be created in the dmg file. This type of volume can not be read by El Capitan. The solution would be to create a dmg file which uses JHFS+ format. The correct command you should be using is given below.

hdiutil create -size &lt;size&gt;b -fs JHFS+ &lt;.dmg-file&gt; -srcfolder &lt;directory&gt; -ov -format UDBZ



  Note: When testing this answer, I used the -megabytes option instead of the -size option. Also, I tested while running High Sierra instead of Mojave.