"非攻", "兼愛" are only 2 of the chapters in 71 chapters of 墨子. 18 Chapters were missing, so now we are looking at 53 remaining chapters...
In the philosophy of 墨子, everyone, from the Emperor to civilians, should hold a noble and high standard to the society. It's really difficult to achieve in the world...
On the other hand, 儒家 promotes hierachy 「君君、臣臣、父父、子子」, which makes the Emperor easier to rule. Between these 2, 儒學 makes the rulers' life easier in terms of ruling.