Why are some energies dependent on reference frame, and some are not? And why is transfer between them possible? For example the chemical energy of a kilogram of gasoline is 44-46 MJ/kg. It is only dependent on its chemical structure, which stays the same, whether the gas tank moves or stays still relative to the observer.
But the kinetic energy of a car depends on the reference frame. In a reference frame of a car A of the same speed, the car B in question have no kinetic energy.
But for a bystander, car B has a lot of kinetic energy.
What puzzles me, is:
1 - why are some energies relative to reference frame and some are not?
2 - why the "absolute" energy from gasoline can be changed into kinetic energy of car, and therefore change into "relative" energy?
I wouldn't be surprised if someone answers "the chemical energy is also relative", but I can't understand why.
 A: 
What puzzles me, is: 1 - why are some energies relative to reference
  frame and some are not? 2 - why the "absolute" energy from gasoline
  can be changed into kinetic energy of car, and therefore change into
  "relative" energy?

The reason is there are two types of energy of an object or substance: Internal Energy and External Energy. The total energy of an object or substance is the sum of the two.
Internal energy, though not directly measurable, is the sum of the microscopic kinetic and potential energies of the atoms and molecules of an object. It is an absolute quantity as it does not depend on an external frame of reference. The chemical potential energy of gasoline is an example of microscopic internal potential energy. The chemical potential energy of the gasoline in the tank of the car does not depend on how fast the car goes, or if it is climbing a hill. The car is made of parts consisting of various materials (metals, plastics, glass, etc). These parts also have internal energy that is independent of the motion or position of the car. One measure of the internal kinetic energy of a part is its temperature.
The external energy of an object or substance is the sum of the external macroscopic kinetic and potential energies of object as a whole is depends on an external frame of reference. The motion and position of your car is an example. Its kinetic energy depends on its velocity relative to a particular external reference frame (the street, another moving car, etc.). Its gravitational potential energy depends on the position in the gravitational field. 
Hope this helps 
A: Many of the answers are right for the most part, but I think they have too much detail. The simple answer is that velocities are reference frame dependent, while lengths are not. Kinetic energy depends on velocity, so it is reference frame dependent. Potential energies depend on lengths between two objects (or from some reference point), so they are not reference frame dependent. 
The transfer of energy between these forms requires work to be done, which relies on the change of lengths (or a velocity over time) through the integral $\int\mathbf F\cdot\text d\mathbf x$. Therefore, we can have transfer between these "absolute" and "relative" types of energy through this "relative" type of energy transfer.
A: Energy is defined as the ability to do work.  Think about yourself floating in space and a high velocity projectile, say a meteor, coming your way.  The only way that meteor can do work on you is via a collision (neglecting the mutual gravitational attraction between you and the meteor for the moment).  The only relevant quantity in the calculation is not, your speed relative to some other frame, or the meteor's speed relative to another frame, but the difference in velocity in a common frame.  In other words the speed of the meteor relative to YOU.  If you and the meteor are moving at the same velocity (relative to some other frame) then that meteor is AT REST relative to you and cannot do work on you.  It is effectively inert.  This does not contradict the fact that some 3rd observer would say you both have a large amount of energy, flying through space at a high speed, since either you or that meteor can do a lot of work on that 3rd observer.
When I observe another object's movement and attribute some K to that body that is a measure of the work I can get out of it.  It makes sense that every other observer would acquire a different answer since K in their frame is a measure of the possible work they can get from the object in a process if interacting with it.  Any observer looking at the interaction of two moving objects should calculate the same internal energy change and momentum transfer between them in a collision process.  Now, what constitutes internal energy?  The total energy can be split into the energy of the center of mass of the system and the relative energy between the internal moving parts. 
This is just one example, not meant to address every possible type of E and process but makes the point that these quantities may be frame depended there is something absolute in play here.  You need to attach a process to these measurements and transform all components of that process from one frame to another to see it.     
A: Chemical energy ultimately comes from electromagnetic interactions. Microscopically it depends on how the electrons and nuclei are placed relative to each other. As an example take two charged particles. The coulomb potential between them is
$$U(x_1,x_2)=k\frac{q_1q_2}{d_{12}}$$ with 
$d_{12}=|x_2-x_1|$. The energy only depends on the difference in positions. This means the energy of this systems doesn't change when you go to a different frame of reference. 
If you transform to a frame with a different velocity the positions transform like
$$x_1'=x_1-vt,\quad x_2'=x_2-vt$$
but the difference in position stays the same: $x_2'-x_1'=(x_2-vt)-(x_1-vt)=x_2-x_1$.
The chemical energy of the gasoline in your car depends on many, many of these interactions. However, since this argument holds for every pair of interactions this also holds for the overall chemical energy. 
Note that in reality you have to use quantum mechanics to calculate the chemical energy where now every electron is described by a wavefunction which is spread out in space. But for this wavefunction a similar argument like the one above holds.
As a second note I would like to add that for moving particles you can no longer apply Coulomb's law, but applying Coulomb's law in this case will still be pretty accurate (I think!).
A: All energy is more or less frame-dependent. This is obvious in the case of the kinetic energy of a moving car, but less so for a quantity of gasoline. An illustration: let's say the chemical energy of 1 kg gasoline is 45 MJ at rest. If you put this gasoline in motion so it moves at 1000 m/s, the total energy will now be 45.5 MJ, since 1 kg of matter moving at 1000 m/s has a kinetic energy of 0.5 MJ.
This situation becomes more clear when looking at it through special relativity instead of the Newtonian approximation. In special relativity, energy is the time-component of the 4-momentum vector. The temporal and spatial components of this 4-vector are transformed into each other when changing reference frames, while only $m_0c^2$ is guaranteed to stay constant.
