Why do we use the particular magnitude of a force to calculate work? I can't say I know physics very well. The most confusing concept for me as for now is potential energy. Often, while introducing potential energy of a gravitational force, the following example is used: imagine an object that has the mass of 1 kilogram that is lying on the earth. The gravitational force acting on it is its mass times $g$ which is about 10 Newtons. Now I want to lift an object two meters up and count the work I've done. In order to produce acceleration, I need to pull on it with a force that is a tiny little bit stronger than 10 Newtons, then I can just maintain a force of 10 Newtons and it will be going up. Now the work I've done is distance traveled times force magnitude, hence 20 Joules. But what if I decided to exert a force that is not 10 Newtons but e.g. 13 Newtons? It would still give that object acceleration upwards, but now the work would be 26 joules. What prevents me from doing so? Is it just a convention to use that exact value of force? I'm pretty confused about it
 A: No there isn't any problem with applying a force greater  than one required to just lift it upwards but then the object would get accelerated and hence would gain some kinetic energy. Usually when we talk about the force applied by the person (lifting the object) it is necessary to know how the force varies with respect to time or position so as to calculate the work done on the object (via $W= \int \mathbf {F_{applied}} \cdot d\mathbf s$). But in the case where such is unknown then we must simplify the case by assuming that $\Delta K = 0J$. Then by work-energy theorem we get $ W_{total} =0J$ and hence $W_{applied force}+W_{gravitation}=0J$(assuming that no other kind of energy transfer occurs). Therefore $W_{applied force}=-W_{gravitation}=-mgh$.
A: You are free to exert any magnitude of force you choose and nothing bounds you from doing that.Most of the books use that magnitude of force which is equal to object's weight so that the object is always in equilibrium.In fact most of the books define potential energy in this manner:-

The change in potential energy of a system is defined as the total amount of work done by an external force against a conservative force in displacing a body $slowly$ from one position to another provided that internal non conservative forces do no work.

$Slowly$ here means that the body is moving with negligible speed.This definition is a bit confusing and conditions such as external force, moving a body slowly and no work is done by internal non conservative forces are imposed on it.Now have a look at the following definition:-

The change in potential energy of the system is defined as the negative of work done by the internal conservative forces of the system.

This definition is way better than the $1^{st}$ one as this doesn't require any specific condition as all it needs is a multi particle system and an internal conservative force.
I am not saying that the  $1^{st}$ definition is wrong but it is not justice to introduce it to a beginner.$1^{st}$ definition is consistent with the $2^{nd}$ one as follows:- According to Work energy theorem:- $$W_{total}=\Delta K_{system}$$ $$W_{internal,cons}+W_{int,non-cons}+W_{external}=\Delta K_{system}$$ Now as the body is lifted slowly according to the  $1^{st}$ definition,$\Delta K_{system}=0$ and $W_{int,non-cons}=0$ but according to $2^{nd}$ definition $\Delta U_{system}=-W_{internal,cons}$.Plug in these values in work energy theorem then,$$\Delta U_{system}=W_{external}$$ Now you can see from the description above that there are so many restrictions imposed on the  $1^{st}$ definition but $2^{nd}$ definition is the most precise definition of potential energy we have.
The most interesting benefit of using $2^{nd}$ definition is that it doesn't cares what external conservative forces are doing,it just cares about work done by internal conservative forces.
A: 
Now the work I've done is distance traveled times force magnitude,
  hence 20 joules.

That is not strictly true. You are neglecting the kinetic energy that the object possesses at 2 meters due to the velocity you initially gave it has when it reaches 2 meters. The total work you did equals the sum of its kinetic energy (which depends on its velocity) and the increase in the potential energy of the object-earth system which is 20 joules. The smaller the velocity and thus the longer it takes to reach 2 meters, the closer your work will be to 20 Joules. Alternatively, if just prior to reaching 2 meters you reduced your upward force a tiny bit below the weight of the object so that it decelerates and has a velocity of zero when it reaches 2 meters, your work will exactly 20 Joules.

But what if I decided to exert a force that is not 10 Newtons but e.g.
  13 Newtons? It would still give that object acceleration upwards, but now the work would be 26 joules.

Yes but now the object will possess 6 Joules of kinetic energy and 20 Joules of gravitational potential energy. The change in gravitational potential energy of the object depends only on the height and equals the negative work done by gravity. It doesn't matter how the object gets to that height. But the change in kinetic energy of the object equals the the difference between the work you did (26 Joules) and the negative work done by gravity (-20 Joules) or 6 Joules. 
Realizing that you are new to physics, the 6 Joules of kinetic energy is the result of the work-energy theorem, which states that the net work done on an object equals its change in kinetic energy. If the object starts at rest on the ground and ends at rest at 2  meters, its change in kinetic energy is zero. Then means the net work done on the object is zero. Which further means the positive work of 20 Joules you do on the object equals the negative work done by gravity. Basically, gravity takes the energy you gave the object and stores it as gravitational potential energy in the earth-object system.
A: The key point to avoid confusion is to have clear in mind the correct attribution of forces, work and potential energy to the corresponding physical systems.
When one introduces the potential energy of a body in the gravitational field, the work of interest is the work done by the gravitational force, which, in general is not the same as the work done to lift the mass, unless one is following the very special protocol of lifting it in a quasi-static way, i.e. with a force almost exactly compensating the gravitational force. Only  this way, the work of the total force (gravitation + lifting force) on the system is zero and the work of the lifting force is equal but opposite to the work of the gravitational force.
