Ideally, at the bare minimum, ActivityPub should have explicitly specified the "shape" of JSON (not JSON-LD) documents.
For example, the spec could have stipulated:
"An Actor document MUST contain the following fields, and MAY be extended via JSON-LD contexts"
And then also stipulate:
"Clients SHOULD expand incoming JSON-LD documents".
This way, applications could skip the expansions step for significantly large subset of the Fediverse.
This is important because not all environments (languages, runtime environemnts, etc.) have the luxury of expanding JSON-LD documents.