The direction of derivative becomes a new argument of a resulting form - TrialFunction, TestFunction or another argument according to the rank of the original form by default. You can override this logic by supplying a new argument, du here. The Cahn-Hilliard demo would work also without specifying this.