Inserting sorted results to another table not working I have been wondering about this tech difficulties

when I executed

(SELECT 
  a.id
, a.no_trx
, SUBSTRING_INDEX(a.no_trx,'/',1) AS 'tipe_trx'
, a.value_date
, a.id_inventory
, a.no_lot
, a.leading_char
, a.amount_in_base
, a.total_price_in_base
, a.qty
, a.unit_id
FROM ksm_mutasi_inv a
JOIN ksm_inventory b
    ON a.id_inventory = b.id
WHERE b.standar_inv_type = 5
ORDER BY a.value_date ASC)


the results are

id  no_trx  tipe_trx    value_date  id_inventory    no_lot  leading_char    amount_in_base  total_price_in_base qty unit_id

....

116 TAI/16/03/0062  TAI 2016-03-31  3648    18.51   +   4695.0000   128205426.0000  4695.0000   1
138 TAI/16/03/0084  TAI 2016-03-31  6282    S5620-1298  +   1828.4500   67320204.5455   1828.4500   1
809 TKMR/16/04/0002 TKMR    2016-04-01  6277    1602-03C    -   76.6500 2880366.2427    1.0000  5
857 TKMR/16/04/0004 TKMR    2016-04-01  6278    2602-03C    -   548.3500    17862391.2289   1.0000  5
1585    TKMR/16/04/0050 TKMR    2016-04-01  6278    2602-03C    -   302.5500    9855505.5463    1.0000  5
825 TKMR/16/04/0003 TKMR    2016-04-01  6271    1601-03B    -   1501.5000   47585767.7650   1.0000  5


.....

but when I using

INSERT INTO ksm_mutasi_inv_benang
    (id,no_trx,tipe_trx,value_date,id_inventory,no_lot,leading_char,
     amount_in_base,total_price_in_base,qty,unit_id)
(SELECT 
  a.id
, a.no_trx
, SUBSTRING_INDEX(a.no_trx,'/',1) AS 'tipe_trx'
, a.value_date
, a.id_inventory
, a.no_lot
, a.leading_char
, a.amount_in_base
, a.total_price_in_base
, a.qty
, a.unit_id
FROM ksm_mutasi_inv a
JOIN ksm_inventory b
    ON a.id_inventory = b.id
WHERE b.standar_inv_type = 5
ORDER BY a.value_date ASC);


and do select * from ksm_mutasi_inv_benang

the results are

id  no_trx  tipe_trx    value_date  id_inventory    no_lot  leading_char    amount_in_base  total_price_in_base qty unit_id

....

137 TAI/16/03/0083  TAI 2016-03-31  6282    S5620-1298  +   195.9600    7214890.9091    195.9600    1
138 TAI/16/03/0084  TAI 2016-03-31  6282    S5620-1298  +   1828.4500   67320204.5455   1828.4500   1
755 TTB/16/04/0001  TTB 2016-04-14  3648    20.52   +   1814.4000   49545455.0000   10.0000 2
756 TTB/16/04/0002  TTB 2016-04-19  6224    12-45   +   907.2000    31477273.0000   5.0000  2
759 TTB/16/04/0003  TTB 2016-04-19  6224    12-45   +   3628.8000   127272728.0000  20.0000 2
765 TTB/16/04/0004  TTB 2016-04-23  6223    12-40   +   1814.4000   50000000.0500   10.0000 2


....

Why is this happening although I already using sort before I inserted it ?

CREATE TABLE ksm_mutasi_inv_benang (
  id int(11) NOT NULL DEFAULT '0',
  no_trx varchar(255) DEFAULT '' ,
  tipe_trx varchar(255) DEFAULT '',
  value_date date DEFAULT NULL ,
  id_inventory int(11) DEFAULT '0',
  no_lot varchar(255) DEFAULT '' ,
  leading_char char(1) DEFAULT '' ,
  amount_in_base decimal(20,4) DEFAULT '0.0000',
  total_price_in_base decimal(20,4) DEFAULT '0.0000',
  qty decimal(20,4) DEFAULT '0.0000',
  unit_id int(11) DEFAULT '0',
  UNIQUE KEY idx_id (id),
  KEY idx_id_inventory (id_inventory),
  KEY idx_no_lot (no_lot),
  KEY idx_id_inv_no_lot (id_inventory,no_lot),
  KEY idx_tipe_trx (tipe_trx),
  KEY idx_value_date (value_date)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



Discovery 1
I just found out by eliminating the index in ksm_mutasi_inv_benang I get the results that I want. Is this really Mysql Bug ?
Short answer:  Use ORDER BY on a SELECT if you want a particular order.

Long answer:

Without an ORDER BY clause on SELECT, the engine is free to order the results in any way it feels like.  This is what you need:

select * from ksm_mutasi_inv_benang
     ORDER BY value_date


But digging a little deeper...  You are copying id from one table to another.  Presumably id is/was AUTO_INCREMENT and the PRIMARY KEY in the source table.  Did you really need to copy it over?  If not, some other ordering may have occurred.

Further...  Using ORDER BY in the INSERT..SELECT was wasted effort since the target table might have its own concept of ordering.  In this particular (and uncommon) case, you have UNIQUE KEY idx_id (id), which was treated as the PRIMARY KEY.  Then, in InnoDB, the data is ordered by the PK.  So, the order of the data in the table is by id.  And the SELECT without an ORDER BY (or WHERE) will simply read the data in PK order.