diff --git a/core/lib/Drupal/Core/Config/Config.php b/core/lib/Drupal/Core/Config/Config.php
index 7c150e9..034dff1 100644
--- a/core/lib/Drupal/Core/Config/Config.php
+++ b/core/lib/Drupal/Core/Config/Config.php
@@ -346,7 +346,6 @@ public function load() {
    *   The configuration object.
    */
   public function save() {
-    $this->sortByKey($this->data);
     $this->storage->write($this->name, $this->data);
     $this->isNew = FALSE;
     $this->notify('save');
@@ -370,26 +369,6 @@ public function rename($new_name) {
   }
 
   /**
-   * Sorts all keys in configuration data.
-   *
-   * Ensures that re-inserted keys appear in the same location as before, in
-   * order to ensure an identical order regardless of storage controller.
-   * A consistent order is important for any storage that allows any kind of
-   * diff operation.
-   *
-   * @param array $data
-   *   An associative array to sort recursively by key name.
-   */
-  public function sortByKey(array &$data) {
-    ksort($data);
-    foreach ($data as &$value) {
-      if (is_array($value)) {
-        $this->sortByKey($value);
-      }
-    }
-  }
-
-  /**
    * Deletes the configuration object.
    *
    * @return Drupal\Core\Config\Config
diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigCRUDTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigCRUDTest.php
index 9eea495..d7a253c 100644
--- a/core/modules/config/lib/Drupal/config/Tests/ConfigCRUDTest.php
+++ b/core/modules/config/lib/Drupal/config/Tests/ConfigCRUDTest.php
@@ -95,7 +95,7 @@ function testCRUD() {
   /**
    * Tests Drupal\Core\Config\Config::sortByKey().
    */
-  function testDataKeySort() {
+  function testDataKeyOrderPreservation() {
     $config = config('config_test.keysort');
     $config->set('new', 'Value to be replaced');
     $config->set('static', 'static');
@@ -112,10 +112,10 @@ function testDataKeySort() {
     $new_config->set('new', 'Value to be replaced');
     $new_config->save();
 
-    // Verify that the data of both objects is in the identical order.
+    // Verify that the data of objects is in the opposite order.
     // assertIdentical() is the required essence of this test; it performs a
     // strict comparison, which means that keys and values must be identical and
     // their order must be identical.
-    $this->assertIdentical($new_config->get(), $config->get());
+    $this->assertIdentical($new_config->get(), array_reverse($config->get()));
   }
 }
diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigImportTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigImportTest.php
index 9316962..2266732 100644
--- a/core/modules/config/lib/Drupal/config/Tests/ConfigImportTest.php
+++ b/core/modules/config/lib/Drupal/config/Tests/ConfigImportTest.php
@@ -128,10 +128,10 @@ function testNew() {
     $staging->write($name, $original_name_data);
     $original_dynamic_data = array(
       'id' => 'new',
+      'uuid' => '30df59bd-7b03-4cf7-bb35-d42fc49f0651',
       'label' => 'New',
-      'langcode' => 'und',
       'style' => '',
-      'uuid' => '30df59bd-7b03-4cf7-bb35-d42fc49f0651',
+      'langcode' => 'und',
     );
     $staging->write($dynamic_name, $original_dynamic_data);
     $this->assertIdentical($staging->exists($name), TRUE, $name . ' found.');
