WP-API/WP-API — pull request #484 by trevordevore (2014-09-18 04:05:44+00:00)
Title: Scans unattached media to see if it is included in the post content. If ...

...the media is referenced in the post content then the media is attached to the post. Function is taken from the XML-RPC implementation.

This brings the behavior of associating media with posts in-line with the XML-RPC implementation which I believe is the correct behavior.